User Tools

Site Tools


python3:input

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
python3:input [2018/08/15 10:56]
jguerin
python3:input [2018/08/15 16:40] (current)
kericson [Benchmarks] - moving from io_tests to input_tests
Line 35: Line 35:
 >>> x = list(map(float, input().split())) >>> x = list(map(float, input().split()))
 1.2 2.3 3.4 4.5 # x=[1.2, 2.3, 3.4, 4.5] 1.2 2.3 3.4 4.5 # x=[1.2, 2.3, 3.4, 4.5]
-</code> 
- 
-===== Output Basics ===== 
-Output is handled with the ''%%print()%%'' function. 
- 
-<code python> 
->>> print() # '\n' 
-</code> 
- 
-<code python> 
->>> print("Hello World!") # "Hello World!\n" 
-</code> 
- 
-<code python> 
->>> print("Hello", "World!") # "Hello World!\n" 
-</code> 
- 
-<code python> 
->>> print(1, 2, 3, sep='') # "123\n" 
-</code> 
- 
-<code python> 
->>> print(1, 2, 3, end='-') 
->>> print("a b c") # "1 2 3-a b c\n" 
 </code> </code>
  
Line 90: Line 66:
  
 ===== Benchmarks ===== ===== Benchmarks =====
-The following benchmarks demonstrate the increased likelihood of failure of ''input()'' as input sizes increase. All files used for testing can be found [[files:python3:io_tests|here]].+The following benchmarks demonstrate the increased likelihood of failure of ''input()'' as input sizes increase. All files used for testing can be found [[files:python3:input_tests|here]].
  
 10 character and 1000 character benchmarks were selected to be indicative of many contest problems, and otherwise should indicate performance under most other assumptions. 10 character and 1000 character benchmarks were selected to be indicative of many contest problems, and otherwise should indicate performance under most other assumptions.
python3/input.1534348569.txt.gz ยท Last modified: 2018/08/15 10:56 by jguerin