My issue
Solve the problem
My code
# Count how many 'o's are present in the string using a 'for' loop and 'if' condition
string = 'bolloon'
count = 0
for c in range(len(string)):
if(c=='o'):
count=count+1
print(count)
# use this variable to count occurrences of o
Learning course: Python with Data structures
Problem Link: Practice Problem in - CodeChef