Get the App
SLTechnology News&Howtos  ›  Development  › 

Tricks in python slicing operation

Shulou Source: shulou.com Published: 2022-06-01 05:49:44 10月02日 Update

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!

Tags: Content articles learning help special examples easy to understand more organization knowledge editing industry information information channels channels research Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno OPPO Reno Redmi MySQL Shulou Technology Docker