Home >Backend Development >Python Tutorial >What does double colon mean 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 tell you about the double colon in Python.
The colon ":" is used to define sharding and step size
For example:
list1 [:3:2], tul1[3:6:2] (note that 3:6 is the index 3 to 5, excluding 6)
Double colon "::" is used to define Reverse order, but the new version of python is no longer used.
The above is the detailed content of What does double colon mean in python?. For more information, please follow other related articles on the PHP Chinese website!