Home >Backend Development >Python Tutorial >What is double colon:: in python?
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]".
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!