0
r"(inputted word)"______in re.findall
How can I add inputted word to r? import re quote = "Always do your best. Your best is going to change from moment to moment; it will be different when you are healthy as opposed to sick. Under any circumstance, simply do your best, and you will avoid self-judgment, self-abuse and regret" word = input() #место для вашего кода pattern = r"word" <---------------- print(len(re.findall(pattern, quote)))
1 Odpowiedź
0
Александр Грамович, use the format function to form the pattern. Look at the code.
https://code.sololearn.com/cjFS32rW9WEZ/?ref=app