Skip to content

Instantly share code, notes, and snippets.

View kotajacob's full-sized avatar

kota kotajacob

View GitHub Profile
def get_can_option():
#RACE CLOSE
print ("Who will you vote for if the race is close?")
can1 = input("CANDIDATE = ")
#RACE NOT CLOSE
print ("Who will you vote for if the race is not close?")
can2 = input("CANDIDATE = ")
#loop through all the options we want, if for the first elif for the middle, else for the last
words, num = open('enable1.txt', 'r').readlines(), 0
for word in words:
aword = word[:-2]
if ''.join(sorted(aword)) == aword:
num += 1
print num