Skip to content

Instantly share code, notes, and snippets.

@theasder
Created December 7, 2018 11:50
Show Gist options
  • Save theasder/7f36966565dbc9a444c8dbe646027ace to your computer and use it in GitHub Desktop.
Save theasder/7f36966565dbc9a444c8dbe646027ace to your computer and use it in GitHub Desktop.
def reverse_print(my_list):
new_list = my_list
values = []
while new_list['next'] is not None:
values.append(new_list['value'])
new_list = new_list['next']
values.append(new_list['value'])
for value in reversed(values):
print(value)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment