This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| files:python3:io_tests [2018/08/14 16:40] jguerin Added footnotes about data generation. | — (current) | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | <file python input.py> | ||
| - | num_lines = int(input()) | ||
| - | |||
| - | for i in range(num_lines): | ||
| - | line = input() | ||
| - | </ | ||
| - | |||
| - | <file python readline.py> | ||
| - | from sys import stdin | ||
| - | |||
| - | num_lines = int(input()) | ||
| - | |||
| - | for i in range(num_lines): | ||
| - | line = stdin.readline() | ||
| - | </ | ||
| - | |||
| - | <file python readlines.py> | ||
| - | from sys import stdin | ||
| - | |||
| - | num_lines = int(input()) | ||
| - | |||
| - | lines = stdin.readlines() | ||
| - | </ | ||
| - | |||
| - | <file python read_test.py> | ||
| - | from sys import argv | ||
| - | from random import * | ||
| - | from string import * | ||
| - | |||
| - | for i in range(int(argv[1])): | ||
| - | print('' | ||
| - | </ | ||
| - | |||
| - | |||
| - | (('' | ||
| - | (('' | ||