+ 1
How can I take more than one input in one line in python?
2 Answers
+ 2
By using list
list_of_inputs = input().split() # separate by whitespace
list_of_inputs = input().split(',') # separate by comma
list_of_inputs = input().split('-') # separate by minus sign
+ 2
as Azi...or you can unpack the input in variables..example... this unpacks a spaces-separated phrase in to three variables and disregards the other words...just amend to suit your needs..
a, b, c, *_ = input().split()
print(a)
print(b)
print(c)