0

Dynaimc way of taking input in python in new line

Question : 1st input is to take how many numbes to take as input dynamically. Based on the first input i enter numbers dynamically in new line each. Example: sample input input1- 5 //represents how many numbers to take input2- 1 input-3 2 input-4 3 input-5 4 input-6 5 Can i know how to take the input in such way ?

12th Jun 2020, 1:32 PM
Vikesh
Vikesh - avatar
2 Answers
+ 2
Take the first number as an integer input and use THAT number in a for loop to ask for more numbers as integer input
12th Jun 2020, 1:36 PM
Slick
Slick - avatar
+ 1
Thank you slick. Seem soo silly question. don't mind I'm just beginer learning python
12th Jun 2020, 1:45 PM
Vikesh
Vikesh - avatar