题解 | #字符串字符匹配#

字符串字符匹配

http://www.nowcoder.com/practice/22fdeb9610ef426f9505e3ab60164c93

while True:
    try:
        short_str = input()
        long_str = input()
        for t in short_str:
            if long_str.count(t)==0:
                print("false")
                break
        else:
            print("true")
    except:
        break
全部评论
else需要缩进,谢谢
点赞 回复 分享
发布于 2022-02-18 09:57

相关推荐

肖先生~:那年秋招闯进一位少年,人们都清楚:成功对他来说只是时间问题
点赞 评论 收藏
分享
评论
1
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务