+ 2

How to get multiple inputs in python and javascript?

29th May 2018, 1:25 AM
aditya saxena
aditya saxena - avatar
2 odpowiedzi
+ 2
Python: a = input() b = input() Or: inps = input().split(“ “) # str to list a, b = tuple(inps) # to tuple then unpacks it ... for two terms separated by space, like “1 2”. Note that in SoloLearn you only input once, but that’s just for SL. For too much input info, it’s better to read it from a txt file.
29th May 2018, 2:07 AM
Pedro Demingos
Pedro Demingos - avatar
0
thnx
29th May 2018, 2:37 PM
aditya saxena
aditya saxena - avatar