Answers for "How to take n space separated Integer in a list in python?"

0

how to input n space separated integers in python

PQT =list(map(int, input().split()[:N]))
Posted by: Guest on December-05-2020
0

print list as space separated python

>>> marks = [12, 23, 34, 56]
>>> print(marks)
[12, 23, 34, 56]
>>> print(*marks)
12 23 34 56

// *[listName] can be used to pass all elememts as separate arguements
Posted by: Guest on December-19-2020

Code answers related to "How to take n space separated Integer in a list in python?"

Python Answers by Framework

Browse Popular Code Answers by Language