Python Program to replace a word with asterisks in a sentence | GeeksforGeeks

preview_player
Показать описание

This video is contributed by Shubham Kumar

Please Like, Comment and Share the Video among your friends.

Install our Android App:

If you wish, translate into local language and help us reach millions of other geeks:

Follow us on Facebook:

And Twitter:

Also, Subscribe if you haven't already! :)
Рекомендации по теме
Комментарии
Автор

If I use re.sub instead, will it's time complexity be better or worse?

Like -
string1 = re.sub(r'word', asterisk, string, flags=re.I)

vinayaksinha