How can you produce the following list with range() in Python?
[9, 8, 7, 6, 5, 4, 3, 2, 1, 0]
because range(n) produces an iterable there are all sorts of nice things you can do which will produce the result you desire, such as:
range(n)[::-1]
if loops are ok, we can make sort of a queue:
a = []
for i in range(n):
a.insert(0,a)
return a
or maybe use the reverse() method on it:
reverse(range(n))