User Tools

Site Tools


python3:input_output

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_output [2018/08/14 17:01]
jguerin Added further description of readlines().
python3:input_output [2018/08/14 19:04] (current)
jguerin
Line 3: Line 3:
  
 ===== Input Basics ===== ===== Input Basics =====
-Input in Python3 is handled via the ''%%input()%%'' function, and reads a newline-terminated string from standard input.((Unlike C++ and Java, input is line-based rather than token-based.)) Additional processing is done to the resulting string.+Input in Python3 is handled via the ''%%input()%%'' function, and reads a newline-terminated string from standard input.((Unlike C++ and Java, input is line-based rather than token-based.)) Any additional processing is done to the resulting string.
  
 <code python> <code python>
Line 102: Line 102:
 ))                 | ))                 |
  
 +The above tests were designed to showcase minimal reading functionality other than temporary storage.((We deliberately avoided additional processing such as typecasts, ''map()'', and ''split()'', as these are non-IO considerations in Python3.))
  
  
  
python3/input_output.1534284095.txt.gz ยท Last modified: 2018/08/14 17:01 by jguerin