python3 read_test.py lines length > out.txt
, where lines
is the number of lines and length
is the number of characters per line.num_lines = int(input()) for i in range(num_lines): line = input()
from sys import stdin num_lines = int(input()) for i in range(num_lines): line = stdin.readline()
from sys import stdin num_lines = int(input()) lines = stdin.readlines()
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]))))
python3 read_test.py lines length > out.txt
, where lines
is the number of lines and length
is the number of characters per line.