Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Blog
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
Please
log in
to post a comment.
Game4
L5- part b
Принцип наименьшего времени Ферма
324
HW. InsertionSort in Descending order
map lambda list
3564
Game4
test1.py
Range List for Python
Please log in to post a comment.