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