地址:https://www.nowcoder.com/practice/22fdeb9610ef426f9505e3ab60164c93?tpId=37&tqId=21304&rp=1&ru=%2Fta%2Fhuawei&qru=%2Fta%2Fhuawei%2Fquestion-ranking&tab=answerKey
1 ''' 2 題目描述 3 判斷短字符串中的所有字符是否在長字符串中全部出現。 4 請注意本題有多組樣例輸入。 5 6 7 8 輸入描述: 9 輸入兩個字符串。第一個為短字符串,第二個為長字符串。兩個字符串均由小寫字母組成。 10 11 輸出描述: 12 如果短字符串的所有字符均在長字符串中出現過,則輸出true。否則輸出false。 13 14 示例1 15 輸入 16 bc 17 abc 18 輸出 19 true 20 ''' 21 22 while True: 23 try: 24 n = input() 25 m = input() 26 except: 27 break 28 nl = list(n) 29 ml = list(m) 30 res = 'true' 31 for i in nl: 32 if i not in ml: 33 res = 'false' 34 print(res)