xah icon

W: Letters

xah | PRO | 11/23/21 07:02:41 AM UTC (Edited) | 0 ⭐ | 377 👁️ | Never ⏰ | []
Python |

230 B

|

None

|

0 👍

/

0 👎

s = input().upper()
 
while s:
    if s == '#':
        break
 
    # s[0] is the letter
 
    output = 0
 
    for ss in s[1:]:
        if ss == s[0]:
            output += 1
 
    print(output)
 
    s = input().upper()

Comments