python索引方法的签名是list.index(x[, start[, end]]). (https://docs.python.org/3/tutorial/datastructs.html)
list.index(x[, start[, end]])
我知道可选参数括在方括号中,但不确定如何解释逗号?
为什么这个方法的签名不能更简单地表示为
list.index(x, [start], [end]) ?
list.index(x, [start], [end])
莫回无
相关分类