How to realize negative step size cutting list by python
This article mainly introduces python how to achieve negative step size cutting list, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let the editor take you to understand it.
Negative step cut list
> > a = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10] > > a [::-1] [10, 9, 8, 7, 6, 5, 4, 3, 2, 0] > a [::-2] [10, 8, 6, 4, 2, 0] Thank you for reading this article carefully. I hope the article "python how to realize negative step cutting list" shared by the editor will be helpful to you. At the same time, I also hope that you will support and pay attention to the industry information channel, and more related knowledge is waiting for you to learn!