by CodeChum Admin
We've already counted digits before on a certain number, so how about doing it on strings and characters? There's a catch, though, since you're only going to count and see if the character exists at least twice in a string.
Instructions:
Input
The first line contains a single-letter string.
The second line contains a string.
e
CodeChum·is·awesome
Output
A line containing a string.
Cody·is·really·awesome
s = input()
l = input()
c =0
for i in s:
if c ==2:
break
if i == l:
c += 1
if c>=2:
print('Cody is really awesome')
else:
print('Cody rock')
Comments
Leave a comment