+ 1

How to deal with multi line input in python?

28th Jul 2020, 8:27 PM
Parikshit Gupta
Parikshit Gupta - avatar
4 Antworten
+ 4
You can do like this : arr = [] For i in range (<number of lines>): arr+=input () Print (arr) Ex number of lines = 3 & Input = 1 2 3 Output=["1","2","3"]
5th Aug 2020, 8:47 AM
Bot
Bot - avatar
+ 3
You deal with it 😃😃 that's how SoloLearn is somehow deficient in this area, but it works Eg a = int(input()) b = int(input()) print(a + b) You enter input this way: 2 3 Output: 5 Hope this helps 😃😃
28th Jul 2020, 8:34 PM
Tomiwa Joseph
Tomiwa Joseph - avatar
+ 1
This code tells you how to deal with SoloLearn input... It need to give all input at once by line by line in python separating in Sololearn.. Kindly run this program.. https://code.sololearn.com/WhiNb9BkJUVC/?ref=app
28th Jul 2020, 8:46 PM
Jayakrishna 🇮🇳
+ 1
how would not I know
6th Aug 2020, 2:09 AM
a___s94.r
a___s94.r - avatar