Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
replace
""" Create a function that takes a string txt and censors any word from a given list lst. The text removed must be replaced by the given character char.""" #Examples #censor_string("Today is a Wednesday!", ["Today", "a"], "-") ➞ "----- is - Wednesday!" #censor_string("The cow jumped over the moon.", ["cow", "over"], "*"), "The *** jumped **** the moon.") text="today is a Wednesday!" text1="the cow jumped over the moon" mag= text.replace("today","-") mag1=text.replace("a","-") print(mag) kal=text1.replace("cow","***") print(kal)
run
|
edit
|
history
|
help
0
PyMenuClass
raja praja
PyGen
Reading XML file
события
H.W 5-Solution
>= Number regex generator
fibonaccii.py
PYTHON 3 ÖDEV :)
Chtkav