+ 4
Receive n number in one line
How can I write a program in Python that: I receive a number (n) from the user in the first line and in the next line I receive n number in one line and save it in the list? Like this: 5 1 2 3 4 5
3 Réponses
+ 5
You can use map and convert it to the list.
For eg. L=list(map(int,input().split()))
This will create a list L of integers.
+ 6
Thanks Pooja Somani
+ 1
Did you try self?