Created
April 3, 2018 06:27
-
-
Save mwrites/f25863000b8e688f4956aba9ad7cf25e to your computer and use it in GitHub Desktop.
Python Iterate on a linked list
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
def iterate_from(list_item): | |
while list_item is not None: | |
yield list_item | |
list_item = list_item.next |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment