Skip to content

Instantly share code, notes, and snippets.

@ro6ley
Created November 18, 2018 16:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ro6ley/2b8b63b23c8c1c128829a46b608ebe4a to your computer and use it in GitHub Desktop.
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
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