我试图用Python编写一个代码,在这里我可以从两个关键字之间的所有单词中得到一个打印出来。scenario = "This is a test to see if I can get Python to print out all the words in between Python andwords"
for line in sce
to code in python and code things我想使用for循环在str1中查找str2,以打印单词是否找到,如果已经找到,则打印str2的索引位置。word was not found")
结果显示是否找到索引位置,然后打印句子中每个单词的索引位置。另外,如果我正在搜索这个句子中出现两次的某个单词