entrada = str(input().lower())
replace = "mem".lower()
find = entrada.lower()
count = 0
while (entrada.find(replace) != -1):
entrada = entrada.replace(replace, "", 1)
count +=1
print(count)
No count,list or lambda can be used. I'm suposed to make a program that receives a lower string from the user then finds, counts and print the number of times a substring appeared. But I'm having problems with overlapping strings.
example: string is memem, the expected exit is 2
AttributeError. Also my question - the user provides both the substring and string?