W3School TIY Editor
W3School 在线教程
改变方向
暗黑模式
python_ref_list_count_2.py:
fruits = [1, 4, 2, 9, 7, 8, 9, 3, 1] x = fruits.count(9) print(x)
x
fruits
=
[
1
,
4
,
2
,
9
,
7
,
8
,
9
,
3
,
1
]
x
=
fruits
.
count
(
9
)
print
(
x
)