Python has two built-in methods that you can use on tuples.
Method | Description |
---|---|
count() | Returns the number of times a specified value occurs in a tuple |
index() | Searches the tuple for a specified value and returns the position of where it was found |
Learn more about tuples in our Python Tuples Tutorial.
截取页面反馈部分,让我们更快修复内容!也可以直接跳过填写反馈内容!