So, there's this example data set I wish to read in:
12
68 69 54 64 68 64 70 67
78 62 98 87
The first line is a number, n
, for n
numbers that will follow. I then want to read n
numbers from the standard input into a single array: as shown in the example, it can spread across lines. Unlike C++, where the following can work:
for (int i=1;i<=n;i++) scanf("%d",&a[i]);
I have no idea if such an equivalent exists in Python. Any insight is greatly appreciated.