0

Function for list

I'm a newbie. Can we make math operation in 'list' ? I make it like this a=list(range(0,100,2)) b=list(range(5,50,5)) counter=0 max_index_a=len(a)-1 max_index_b=len(b)-1 Can I make function like this? def my_func(): int(for anything in a) // int(for whatever in b)

19th Jul 2017, 2:04 PM
Chrysant Celine
Chrysant Celine - avatar
1 Antwort
0
Yes, you just have to focus the elements by their indexes. a[0] // b[1]
19th Jul 2017, 3:20 PM
clement
clement - avatar