单选题

已知字符串str1 = 'welcome to China',word = 'some',查询word在str1中首次出现的位置,以下代码正确的是?( )

A

print(str1.index(word))

B

print(str1.find(word))

C

print(str1.find(str1, word))

D

print(str1.index(str1, word))

赣ICP备20007335号-2