• Courses
  • Tutorials
  • DSA
  • Data Science
  • Web Tech
June 10, 2022 |2.5K Views

Python Program to replace a word with asterisks in a sentence

Description
Discussion

Input : word = “computer” 


text = “GeeksforGeeks 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 : GeeksforGeeks is a ******** science portal for geeks. People who love ******** and ******** codes can contribute their valuables/ideas on ******** codes/structures on here.

Python Program to replace a word with asterisks in a sentence : https://www.geeksforgeeks.org/program-censor-word-asterisks-sentence/