User Tools

Site Tools


files:python3:io_tests

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
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> 
- 
-<file python readline.py> 
-from sys import stdin 
- 
-num_lines = int(input()) 
- 
-for i in range(num_lines): 
-    line = stdin.readline() 
-</file> 
- 
-<file python readlines.py> 
-from sys import stdin 
- 
-num_lines = int(input()) 
- 
-lines = stdin.readlines() 
-</file> 
- 
-<file python read_test.py> 
-from sys import argv 
-from random import * 
-from string import * 
- 
-for i in range(int(argv[1])): 
-    print(''.join(choice(ascii_lowercase + ' ') for _ in range(int(argv[2])))) 
-</file> 
- 
- 
-((''python3 read_test.py 1000 10 > out.txt'')) 
-((''python3 read_test.py 1000 1000 > out.txt'')) 
  
files/python3/io_tests.1534282838.txt.gz ยท Last modified: 2018/08/14 16:40 by jguerin