English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
In Python, tuples are immutable. This means that once a tuple is assigned, you cannot change its items. Tuple objects can only call two tuple methods: count() and index().
Method | Description |
---|---|
count() | Return the number of times the specified value appears in the tuple. |
index() | Search for a specified value in the tuple and return its position if found. |
In our Python tuple tutorial Learn more about tuples in Chinese.