+ 3

I wanna make two input in the same line

1st Mar 2017, 12:36 PM
Tech with Sami التقنية مع سامي
Tech with Sami التقنية مع سامي - avatar
3 ответов
+ 5
# You must decide for a character to use as separator, so you can do: sep = "," ask = input("give me two values separated by a coma: ") ask = ask.split(sep) ask1 = ask[0] ask2 = ask[1] # ... or less verbosely, but less readable also: ask1, ask2 = input("two values coma separated: ").split(",") # Anyway, the split() method doesn't return necessarly 2 values, but a list with the string splitted at each separator char ^^
2nd Mar 2017, 7:40 AM
visph
visph - avatar
1st Mar 2017, 1:27 PM
Tech with Sami التقنية مع سامي
Tech with Sami التقنية مع سامي - avatar