You are viewing a single comment's thread. Return to all comments →
Python 3 solution, not the most efficient:
def reversePrint(llist): vals = [] while llist: vals.append(llist.data) llist = llist.next if vals: reversed_vals = reversed(vals) for t in reversed_vals: print(t)
Seems like cookies are disabled on this browser, please enable them to open this website
Print in Reverse
You are viewing a single comment's thread. Return to all comments →
Python 3 solution, not the most efficient: