What is double colon:: in python?

little bottle
Release: 2020-09-19 13:56:05
Original
28152 people have browsed it

In Python, the double colon "::" is used to define reverse order, but it is no longer used in the new version of python; and the ":" symbol is used to define sharding and step size, and its syntax is such as "list1[: 3:2], tul1[3:6:2]".

What is double colon:: in python?

The syntax in Python is simple, but sometimes it is confusing. Friends who have not studied systematically do not understand it very well. Today I will give you Let’s talk about the colon “:” and the double colon “::” in Python.

Colon: used to define fragmentation and step size, such as
list1[:3:2], tul1[3:6:2] (note that 3:6 is the 3rd to 3rd index) 5, not including 6)
Double colon:: is used to define reverse order, but it is no longer used in the new version of python.

The above is the detailed content of What is double colon:: in python?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!