+ 1
How to deal with multi line input in python?
4 Answers
+ 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"]
+ 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 đđ
+ 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
+ 1
how would not I know