I know this is probably something incredibly simple, but I seem dumb. In any case, for the assignment, I need the user to enter the number of data points (N), followed by the data points themselves. Then they should be printed the same way they were entered (one data point / line), and then placed on one list for later use. That's what i still have
N = int(input("Enter number of data points: "))
lines = ''
for i in range(N):
lines += input()+"\n"
print(lines)
for n = 4 (the user enters 1 (input) 2 (input) ... 4 and the following is printed:
1
2
3
4
So, this works and looks perfect, but now I need to convert these values to a list so that some statistics work later in the program. I tried making an empty list and entering lines in it, but it seems that the / n structure will ruin everything. Or I get an index index out of range. Any help is appreciated!
source
share