How do i receive multiple numbers from one input as a list of integers, then add this list to another list? To better explain, here's my last attempt:
list = []
for z in range (0, int(input())):
list.append(input().split())
print(list[0])
print(list[1])
print(list)
with the inputs:
2
1 2
5 8
I get the following outputs:
['1', '2']
['5', '8']
[['1', '2'], ['5', '8']]
Now, what Iām looking for, is to receive those inputs somehow as integers, so the output for the same inputs would be:
[1, 2]
[5, 8]
[[1, 2], [5, 8]]
Thanks in advance for taking your time to help. I have tried to find the solution in the forum, but failed. Sorry if this has already been asked.