How do i input in python when number of integers/characters depend on a number present in line itself and they all are separated by space.
input:
3 100 200 300
1 934
5 78 6 100 98 90
Here first number in line is the number of integers following it. and i want to take input as:
first number stored in a variable n
and following 'n' numbers in an array a
so for first line, n=3, a[0]=100, a[1]=200, a[3]=300 .. that way
EDIT: the way in C++ i can scan two integers separated by any number of space easily by cin>>x>>y; how to do that in python?