How to take multiple integers as input in python | SoloLearn: Learn to code for FREE!

+2

How to take multiple integers as input in python

In one problem I want to take multiple integers as input as follows : 4 6 7 9 Please help me

6/1/2020 6:02:12 AM

Akash Babasaheb Chavan

3 Answers

New Answer

+10

for i in range (4): List.append(input()) You can she something like it

+3

If you can take one input you can take multiple input as well. There are few ways a. input in a loop b. input as string and split it If you are trying to do it on Sololearn then read this https://code.sololearn.com/WhiNb9BkJUVC/?ref=app

+2

Akash Babasaheb Chavan U should also know about this 👇👇👇 d=[] while True: a=input() if a!="Exit":d.append(int(a)) else:break print(d)