VOOZH about

URL: https://www.geeksforgeeks.org/python/uwu-text-convertor-in-python/

⇱ UwU text convertor in Python - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

UwU text convertor in Python

Last Updated : 7 Aug, 2021

UwU is used as an emoticon to demonstrate a reaction to something cute. In this emoticon, the 'U's signify 2 closed eyes and the 'w' signifies the clenched, excited mouth lips. Imagine seeing something cute, like a baby cutely sneezing, the response can be UwU which is pronounced as "ooh-wooh".

UwU text is the type of lingo in which the original text has been "UwUfied". UwU text is supposed to be a cuter version of the original text. It is popular with certain online communities, mostly as a fun practice.

Examples: 

Input : The quick brown fox jumps over the lazy dog.
Output : The quick bwown fox jumps ovew the wazy dog.

Input : Nooo! I was not late to work!
Output : Nyooo! I was nyot wate to wowk!

Algorithm :  

  • Change all the 'R's and 'r's to 'w' and 'W' respectively.
  • Change all the 'L's and 'l's to 'w' and 'W' respectively.
  • If the current character is 'o' or 'O' and the previous character is either 'M', 'm', 'N' or 'n', then add 'y' between the characters.
  • If none of the condition matches for any character then leave that character as it is.

Output : 

The quick bwown fox jumps ovew the wazy dog.
Nyooo! I was nyot wate to wowk!


 

Comment
Article Tags: