0

How to pass an list as an argument to a func??

And what to write in def for it??

3rd Jan 2017, 9:12 AM
Deep Patel
Deep Patel - avatar
3 Answers
+ 7
def func(array): for arr in array: print(arr) array = [1,2,3,4,5] func(array)
3rd Jan 2017, 9:14 AM
Valen.H. ~
Valen.H. ~ - avatar
+ 6
Yes.
3rd Jan 2017, 9:21 AM
Valen.H. ~
Valen.H. ~ - avatar
+ 1
will i be able to access arr[3]??
3rd Jan 2017, 9:20 AM
Deep Patel
Deep Patel - avatar