Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to take n space separated input in python” Code Answer’s

N = 5
num = [int(i) for i in input().split()][:N]
print(num)

# Output: [1, 2, 3, 4, 5]
Source by codethebrain.com #
 
PREVIOUS NEXT
Tagged: #space #separated #input #Code
ADD COMMENT
Topic
Name
7+5 =