def setup():
input_string = "Thailand"
reference = "a"
count_string = my_count(input_string,reference)
print(count_string)
def my_count(string,reference):
index = 0
count = 0
while(index < len(string)):
if(string[index] == reference):
count+=1
index+=1
return count
setup()
No comments:
Post a Comment