Created
November 18, 2018 16:59
-
-
Save ro6ley/2b8b63b23c8c1c128829a46b608ebe4a to your computer and use it in GitHub Desktop.
Function to check whether the letters in a word are in the Alphabetic order
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def check_order(str): | |
""" | |
This function checks whether the letters in an alphabet | |
are sorted alphabetically and returns True. | |
Otherwise it returns False | |
""" | |
if ''.join(sorted(list(str))) == str: | |
return True | |
else: | |
return False | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment