Result Size:
625 x 571
demo_ref_list_index.py:
fruits = ['apple', 'banana', 'cherry'] x = fruits.index("cherry") print(x)
x
fruits
=
[
'apple'
,
'banana'
,
'cherry'
]
x
=
fruits
.
index
(
"cherry"
)
print
(
x
)
C:\Users\My Name>python demo_list_index.py
2