Skip to content

Instantly share code, notes, and snippets.

@imbolc
Last active August 29, 2015 14:08
Show Gist options
  • Save imbolc/f73cde848b96bd253b16 to your computer and use it in GitHub Desktop.
Save imbolc/f73cde848b96bd253b16 to your computer and use it in GitHub Desktop.
`for` statement implementation with `while`
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