How can I get an input like this in python3
The first input is = 2 and based on this first input I want to get 2 get new inputs
For example:
2 # how many inputs?
1 2 # 2 numbers inputs
or
3 # how many inputs?
3 5 8 # in one line getting 3 inputs
Here is another example:
4
6 8 7 9
How I can get in one line inputs based on the first input?
I tried to use map but with no luck
n = int(input())
for i in range(n):
x = map(int,input().split())
But the output is
if n is 2
1 2
Again asking for inputs because of i = 0 getting 1 2 and i = 1 again asking for input.