How to get two input from user on sololearn? In python | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 14

How to get two input from user on sololearn? In python

Python input

3rd May 2018, 6:34 PM
Ratnapal Shende
Ratnapal Shende - avatar
4 Respostas
+ 2
If you mean two inputs at time, you can just write like this: A, B = input("write 2 values separated by coma") Finally, the first value written will be stored in the variable A, and the second to B.
3rd May 2018, 7:15 PM
sidi med
sidi med - avatar
+ 11
AliRą«Æza didn't work
3rd May 2018, 6:49 PM
Ratnapal Shende
Ratnapal Shende - avatar
+ 11
Can you share me your code please that have two input
3rd May 2018, 6:50 PM
Ratnapal Shende
Ratnapal Shende - avatar
+ 6
Use input() function twice in the code. Enter the two inputs in two different lines. Another way is to get space-seperated inputs and split them.
3rd May 2018, 6:39 PM
DAB
DAB - avatar