Hacker News new | ask | show | jobs
by heyalexej 4090 days ago

    print [i for i in reversed(range(101))]
1 comments

Why reversed range? Range is fully capable of descending [1]

You also missed the point of the exercise: start at 0 in your index, but count backward from 100 in output. So the map is 0->100, 1 -> 99, ..., 99 -> 1, 100 -> 0

[1] https://docs.python.org/2/library/functions.html#range

Soooo, I won't get the job?