I have strings like this:
strA = "Today is hot. My dog love hot dog, milk, and candy."
strB = "hot dog and bread"
I hope the output string like:
"Today is hot. My dog love hot dog and bread, milk, and candy."
not
"Today is hot dog and bread. My dog love hot dog, milk, and candy."
I tried to use str.find()
but it's not suitable.
if strA.find(strB) != -1:
x = strA.find(strB)
listA = list(strA)
listA.insert(x, strB)
output = ''.join(listA)