- 1
String parsing
How do I return true if all letters, in order, even though it is capital or not are in a string?
1 ответ
0
def checkstring(mystring):
if list(mystring.replace(' ', '').lower()) == sorted(mystring.replace(' ', '').lower()):
return True
else:
return False
mystring = 'Abc eFG'
print(checkstring(mystring))