有没有另一种更简单的方法来编写代码,基本上检查字符串的每个字符 'abcde'
'abcde'
if input == 'a' or input == 'ab' or input == 'abc' or input == 'abcd' or input == 'abcde': return True
python string string-comparison
python ×1
string ×1
string-comparison ×1