def filter_word(value, first, last, repeat, r_char):
output = False
value = [ x for x in value ]
first_char, second_char, second_last_char, last_char = value[0], value[1], value[-2], value[-1]
if first_char == first and last_char == last and second_char != last_char and ord(second_last_char) == second_last:
if second_char in vowels and second_char in [ y for x, y in reference.iteritems() ]:
string = []
last = None
for char in value:
if last != None:
if char == last and char not in vowels:
string.append(char)
elif char != last:
string.append(char)
else:
string.append(char)
last = char
if len(string) == len(value):
if repeat:
last = None
for char in value:
if last != None:
if char == last:
output = True
last = char
else:
third_char = value[2]
if ord(third_char) > ord(second_last_char) and ord(second_char) > ord(second_last_char):
output = True
return output
def find_word(values, first, last, length, repeat, r_char):
first, last, output, items, count = reference[first], reference[last], [], [], 0
*(unless you're REALLY trying)