在Python3中,下列说法正确的是:
lists = [1, 2, 2, 3, 4, 5] print(lists.index(2))
str1 = "this is string example....wow!!!" str2 = "string" print(str1.index(str2)) 答案: 8
index(self, value, start=0, stop=9223372036854775807, /) Return first index of value. Raises ValueError if the value is not present.