Last active
August 29, 2015 14:08
-
-
Save imbolc/f73cde848b96bd253b16 to your computer and use it in GitHub Desktop.
`for` statement implementation with `while`
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
seq = ['a', 1, True, 'b', 'foo', 'bar'] | |
for item in seq: | |
print(item) | |
print() | |
i = 0 | |
while i < len(seq): | |
print(seq[i]) | |
i = i + 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment