Say we have a list of numbersintegers from 0 to 1000. Is there a pythonic/efficient way to produce:
[0, 1, 2, 3, ..., 997, 998, 999]
How do I get a new list ofcontaining the first and every subsequent 10th item, i.e. [0, 10, 20, 30, ... ]?
[0, 10, 20, 30, ..., 990]
Yes, I can do this using a for loop, but I'm wondering if there is there a neater way to do this, perhaps even in one line of code?