+ 1

How to pass multiple user input to a function during runtime( dynamically) ?

9th Sep 2016, 7:03 PM
AVINASH TIWARI
AVINASH TIWARI - avatar
4 Answers
+ 1
Just use input() multiple times, storing the value given in a different variables each time, then call your function with your variables.
9th Sep 2016, 7:10 PM
Zen
Zen - avatar
+ 1
catch the input in different variable and the supply those variable in function call
10th Sep 2016, 7:50 AM
Chirag Rade
Chirag Rade - avatar
+ 1
what I need to know is how to store it dynamically into the list like we do in other programming language while using array so how can it be done in Python so it will be more dynamic as compared to the old one.
10th Sep 2016, 12:45 PM
AVINASH TIWARI
AVINASH TIWARI - avatar
0
The correct answer is make a function like this and pass the list name def f(list): for I in list: total+=I print(total) now declare the list and paas the list name in the function. as follows l=[1,2,3,4] f(l)
15th Sep 2016, 4:49 AM
AVINASH TIWARI
AVINASH TIWARI - avatar