+ 1

How to create multiple inputs?

Is there any way to create multiple inputs here in Sololearn, in Python?

13th Aug 2018, 4:57 PM
Artem Khaiet
Artem Khaiet - avatar
6 Answers
+ 1
Yes, you can, you just need to split them into separate lines in the dialog box.
13th Aug 2018, 5:52 PM
Just A Rather Ridiculously Long Username
+ 3
Ryan Gosling there's already exactly the same answer from Just A Rather Ridiculously Long Username
15th Aug 2018, 9:41 AM
<<Meowg!i>>
<<Meowg!i>> - avatar
+ 2
Artem Khaiet Of course your code can't read two lines, because there's only one input()! If you need two inputs, print so: a = input() print(a) b=input() print(b) You can use this code for infinity inputs: while True: print(input()) However, it raises EOF Error at the end. So, you can catch this exception: while True: try: print(input()) except EOFError: break Unfortunately, it's impossible here to get inputs when code runs. Anyway, it's enough for testing.
13th Aug 2018, 11:16 PM
<<Meowg!i>>
<<Meowg!i>> - avatar
+ 1
No. I made this but I don’t think that’s what you are looking for. https://code.sololearn.com/WBSLsJW430mB/?ref=app
13th Aug 2018, 5:41 PM
Toni Isotalo
Toni Isotalo - avatar
+ 1
◀◀Meowg!i▶▶ Thanks! Although it's not really what I was expecting multiple inputs to be, I guess I can do something with it.
14th Aug 2018, 1:03 AM
Artem Khaiet
Artem Khaiet - avatar
0
Just splite them into separate lines while inputting
15th Aug 2018, 5:42 AM
Ryan Gosling
Ryan Gosling - avatar