W3School TIY Editor
W3School 在线教程
改变方向
暗黑模式
python_ref_tuple_index.py:
thistuple = (1, 3, 7, 8, 7, 5, 4, 6, 8, 5) x = thistuple.index(8) print(x)
x
thistuple
=
(
1
,
3
,
7
,
8
,
7
,
5
,
4
,
6
,
8
,
5
)
x
=
thistuple
.
index
(
8
)
print
(
x
)