列表的index()函数
使用help()得到:
Help on built-in function index:
index(value, start=0, stop=2147483647, /) method of builtins.list instance
Return first index of value
Raises ValueError if the value is not present.

博客主要介绍了列表的index()函数,通过help()获取该函数信息,其可返回值的第一个索引,若值不存在则会引发ValueError。
列表的index()函数
使用help()得到:
Help on built-in function index:
index(value, start=0, stop=2147483647, /) method of builtins.list instance
Return first index of value
Raises ValueError if the value is not present.


被折叠的 条评论
为什么被折叠?