Home >Backend Development >Python Tutorial >What does double colon mean in python?

What does double colon mean in python?

little bottle
little bottleOriginal
2019-05-30 16:36:1413108browse

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.

What does double colon mean 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!

Statement:
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
Previous article:How to wrap python printNext article:How to wrap python print