+ 1

What var does?

the question looked like this: for var __ list

16th Feb 2017, 2:37 PM
אלעד מועדים
אלעד מועדים - avatar
1 Answer
+ 4
it just for iterating over a list (or over any other iterable object) the syntax is: lst=[1,2,3,4] for var in lst: print(var) var is a just name for the iterator you can use something else: for x in lst: print(x)
16th Feb 2017, 4:27 PM
Burey
Burey - avatar