Home > Backend Development > Python Tutorial > Detailed introduction to python data type tuples

Detailed introduction to python data type tuples

高洛峰
Release: 2017-03-20 10:52:29
Original
1832 people have browsed it

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 只索引到第一处
>>>
Copy after login

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!

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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template