0

Python cycles.Cycle 'for..in'

I really don't understand how the cycle 'for...in' works in Python.I'm bad at english,so can you answer me by using simple works.

23rd Jul 2017, 6:10 PM
Kуlibin
Kуlibin - avatar
3 Answers
+ 3
It goes through each element of the list (or any other iterable data structure) and on each pass it returns the current element's value to the iterator. for x in [1,5,3,8,67,9]: print(x) will just print those numbers in the order they are in the list.
23rd Jul 2017, 7:20 PM
Kuba Siekierzyński
Kuba Siekierzyński - avatar
0
FOR each element IN this list -> return element french?
23rd Jul 2017, 6:15 PM
clement
clement - avatar
0
No,ukranian
23rd Jul 2017, 6:17 PM
Kуlibin
Kуlibin - avatar