python how many times is a char in a string code example Example: python count how many times a character appears in a string string.count('a')