In coding contests, I am supplied an initialization file from which to read initial parameters. However, sometimes the parameters are spread over separate lines as follows:
x
a
b
(All of them integers)
Now when I read line1, I believe I would store x like this:
x = int(sys.argv[1])
How do I take care of other lines? Will sys.argv[2] give me the next parameter on line 2?
More precisely, will using:
par_list = sys.argv[1:].split(" ")
give me a list of parameters on all the lines?