Kxffie

Curse Words to Censored Words Converter in Python

Jan 3rd, 2023
1,242
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.34 KB | None | 0 0
  1. # grawlixes converter
  2. # https://youtu.be/F5Bn_lM4tdo
  3.  
  4. import random
  5. import string
  6.  
  7. def convert_text(word):
  8.   converted_word = word[0]
  9.  
  10.   for i in range(1, len(word) - 1):
  11.     converted_word += random.choice("!@#$%&?()*[\]")
  12.  
  13.   converted_word += word[-1]
  14.  
  15.   return converted_word
  16.  
  17. print(convert_text(input("converted text: ")))
  18.  
Advertisement
Add Comment
Please, Sign In to add comment