Tuple Methods
Tuples only have two methods because they are immutable.
| Method | Description |
|---|---|
count(x) | Count occurrences of x |
index(x) | Index of first x |
Example
t = (1, 2, 2, 3)
print(t.count(2), t.index(3))