+ 1

How can I take more than one input in one line in python?

4th Apr 2020, 8:04 PM
Sιʍєռʏα Ɉ๏ռαȶɦαռ En๏ch
Sιʍєռʏα Ɉ๏ռαȶɦαռ En๏ch - avatar
2 Respostas
+ 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
4th Apr 2020, 8:12 PM
Azi 🇺🇿
+ 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)
4th Apr 2020, 8:46 PM
rodwynnejones
rodwynnejones - avatar