Skip to content

Instantly share code, notes, and snippets.

@aniruddha27
Created May 16, 2020 20:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aniruddha27/28a3bfa0c30ecccb3fac84510a9b912f to your computer and use it in GitHub Desktop.
Save aniruddha27/28a3bfa0c30ecccb3fac84510a9b912f to your computer and use it in GitHub Desktop.
sample = ['data science', 'business analytics', 'machine learning']
# generating an iterator
it = sample.__iter__()
print(it)
# iterables do not have __next__() method
sample.__next__()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment