Example:
Input: word = “computer”
text = “Python.Engineering is a computer science portal for geeks. People who love computer and computer codes can contribute their valuables / ideas on computer codes / structures on here. ”
Output: Python.Engineering is a ******** science portal for geeks ... People who love ******** and ******** codes can contribute their valuables / ideas on ******** codes / structures on here.
The idea is to break the given sentence into different words first. Then go through the word list. For each word in the word list, check if it matches the given word. If so, replace the word with asterisks in the list. Finally, concatenate the list words and type.
|
python3
|
C #
|
|
Output:
Python.Engineering is a ******** science portal for geeks. I am pursuing my major in ******** science.
Shop
Latest questions