What should I do if I have a generator (such as range(10)) instead of a list and I want to traverse it in reverse order?