Print a list in reverse order with range()?
use reversed() function: reversed(range(10)) It’s much more meaningful. Update: If you want it to be a list (as btk pointed out): list(reversed(range(10))) Update: If you want to use only range to achieve the same result, you can use all its parameters. range(start, stop, step) For example, to generate a list [5,4,3,2,1,0], you can use the … Read more