Q&A
文字列の中にリストの各文字が含まれていないか確認したいのですが、どのようにしたら良いでしょうか?
python
1a = ["ab", "gh"] 2c = "abcdefg" 3if a in c: 4 print(location()) 5else: 6 print(location())
zsh
1Traceback (most recent call last): 2TypeError: 'in <string>' requires string as left operand, not list
回答2件
下記のような回答は推奨されていません。
このような回答には修正を依頼しましょう。
2023/01/13 06:24