Home  >  Article  >  Backend Development  >  Detailed introduction to python data type tuples

Detailed introduction to python data type tuples

高洛峰
高洛峰Original
2017-03-20 10:52:291795browse

This article describes the detailed introduction of python data type tuples

Tuples are actually a read-only list that cannot be added or changed, and can only be queried

For immutable information, Using tuples: For example, the two methods of data connection configuration

tuples: index, count

>>> r = (1,1,2,3)
>>> r.count(1)
>>> r.index(1)  # index 只索引到第一处
>>>

The above is the detailed content of Detailed introduction to python data type tuples. 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