27 Nov PMCA Sunday 16:00 Python Homework 11.24
Question:
Using function or object method to write a program to return the number of times that the string “code” appears anywhere in the given string, except we’ll accept any letter for the ‘d’, so “cope” and “cooe” count.
For example:
‘aaacodebbb’ will have 1 “code”
‘codexxcode’ will have 2 “code”
‘cozexxcope’ will be counted as 2, since ‘coze’ and ‘cope’ count
Sorry, the comment form is closed at this time.