want to count the number of times a letter appears in a string, having issues here. any help
def countLetters(string, character):
count = 0
for character in string:
if character == character:
count = count + 1
print count
character == characteris going to be very true all the time.string) or builtins as variable names.float('nan') == float('nan') == False__eq__to do something else. :)