Inputs in Python | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Inputs in Python

Can you have multiple inputs in python? If so, how?

27th Nov 2018, 8:23 AM
Simetra
Simetra - avatar
2 Answers
+ 7
go throug the comment section of INPUT lesson , there are many examples of multiple inputs https://www.sololearn.com/learn/JUMP_LINK__&&__Python__&&__JUMP_LINK/2426/ //have a look at this simple example : a = input("Enter something please: ") print(a) b = input("Enter something again please: ") print(b)
27th Nov 2018, 8:34 AM
Gaurav Agrawal
Gaurav Agrawal - avatar
+ 6
Yes you can by either putting multiple input() statements and entering your inputs on separate lines or splitting your input.
27th Nov 2018, 8:32 AM
Uni
Uni - avatar