Last active
July 21, 2018 18:35
-
-
Save vinaykudari/93dcafcb56414a59d8fb960421b18bcd to your computer and use it in GitHub Desktop.
example1
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
#lis is an iterable | |
lis = [1,2,3] | |
#lis_iter is an iterator | |
lis_iter = iter(lis) | |
#next() will return consecutive values untill the end | |
for i in range(len(lis)): | |
print(next(iterator)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment