How would you number a number back without using a list in Python 3?
Using lists, I would probably do something like:
li = list(range(100))
for i in li[::-1]:
print(i)
This is a great solution, but it does not work with huge numbers. Right now, I am trying to repeat the number back with large numbers, but an overflow error occurs, so I think I need to somehow find a way to repeat the number back without using lists.
Is there any way?
source
share