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 19:11]
jguerin
— (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 lines length > out.txt'', where ''lines'' is the number of lines and ''length'' is the number of characters per line.)) 
- 
  
files/python3/io_tests.1534291909.txt.gz ยท Last modified: 2018/08/14 19:11 by jguerin