count the number of times a letter appears in a string then index it python code example Example: python count how many times a character appears in a string string.count('a')