Tricks in python slicing operation
This article mainly shows you the "python slicing operation in the tricks", the content is easy to understand, clear, hope to help you solve doubts, the following let the editor lead you to study and learn "python slicing operation in the tricks" this article.
Tricks in slicing operation
A = [1, 2, 3, 4, 5] > > a [:: 2] [1, 1, 3, 5]
A special example is x [::-1], which reverses the list
> a [::-1] [5Jing 4Jing 3 Jing 2Jue 1] the above is all the contents of this article "tricks in python slicing Operation". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!