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

字符串字符匹配

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

def is_substr(s1, s2):
    for c in s1:
        if c not in s2:
            return False
    return True
while True:
    try:
        s1 = input()
        s2 = input()
    except EOFError:
        break
    print('true' if is_substr(s1,s2) else 'false')
全部评论

相关推荐

点赞 收藏 评论
分享
牛客网
牛客企业服务