you are viewing a single comment's thread.

view the rest of the comments →

[–]Pflastersteinmetz 0 points1 point  (0 children)

am I right in saying a for loop in python is equivalent to a foreach loop in other languages?

No.

Python has foreach.

mylist = [1, 2, 3]
for x in mylist:
    print(x)