11 lines
321 B
Python
11 lines
321 B
Python
import regex as re
|
|
|
|
|
|
def replace_vulgarism(usr_input: str) -> str:
|
|
return re.sub(r'\p{Ll}*(chuj|pizd|jeb|pierd|kur)\p{Ll}*', '---', usr_input, flags=re.IGNORECASE)
|
|
|
|
|
|
if __name__ == '__main__':
|
|
usr_input = input("Podaj przykładowe zdanie: ")
|
|
print("Zdanie zmienione: ")
|
|
print(replace_vulgarism(usr_input)) |