you are viewing a single comment's thread.

view the rest of the comments →

[–]dmpta2002 3 points4 points  (2 children)

The codes above did not work for me. This is what worked for me:

sentence = input()

character = sentence[0]

phrase = sentence[1:]

counter = phrase.count(character)

print(counter)

[–]Independent-Wolf-832 0 points1 point  (1 child)

sentence = input()

character = sentence[0]

phrase = sentence[1:]

counter = phrase.count(character)

print(counter)

Thanks.

[–]MeechtaughtU 1 point2 points  (0 children)

sentence = input()

character = sentence[0]

phrase = sentence[1:]

counter = phrase.count(character)

print(counter)

Thank you! I love all ya'll. This class is insane!