Back to General discussions forum
I am storing that lines just inside of my source code.But I want to make it possible to do it the normal way.
There are several ways.
You could use:
sys.stdin.readlines()
Or,
n = int(input())
lines = []
for _ in range(n):
lines.append(input())
Personally, I would use something like:
n = int(input())
lines = [input() for _ in range(n)]
I hope I have been of some help.
-- Christopher P. Matthews