Replacing a words’ letters in a string [closed]

  python, python-3.x

I am a beginner in Python. I am trying to replace the input words’ letters except for the first one, with "*" (like censoring) in a string. Explaining with an example will be better.

text= "Every breath you take every move you make"
Enter the word you want to censor: every
2 incident(s) found!
Censored lyrics:
E**** breath you take e**** move you make

Any help would be appreciated!

Source: Python Questions

LEAVE A COMMENT