第三章 7-3 输出字母在字符串中位置索引

s=list(input())[::-1]
ls=input().split()
for i in ls[::-1]:
    for j in range(len(s)):
        if s[j]==i:
            print('{} '.format(len(s)-j-1)+ i)
发布了80 篇原创文章 · 获赞 6 · 访问量 7638

猜你喜欢

转载自blog.csdn.net/qq_33749437/article/details/104881125