Skip to content

Instantly share code, notes, and snippets.

@kotajacob
Created October 20, 2015 22:25
Show Gist options
  • Save kotajacob/9fe50ab5491d332b62e3 to your computer and use it in GitHub Desktop.
Save kotajacob/9fe50ab5491d332b62e3 to your computer and use it in GitHub Desktop.
words, num = open('enable1.txt', 'r').readlines(), 0
for word in words:
aword = word[:-2]
if ''.join(sorted(aword)) == aword:
num += 1
print num
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment