Created
October 20, 2015 22:25
-
-
Save kotajacob/9fe50ab5491d332b62e3 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
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