Exercise: Clean up gibberish II
Here, the text is even messier.
E
has been replaced by &
, and S
has been replaced by *
. Clean up the mess using str.replace()
. Hint: You have to use str.replace()
twice, but remember that the method does not change the original string 😉.gibberish = '&L&PHANT* &AG&RLY &AT &NORMOU* AMOUNT* OF D&LICIO&* WAT&RM&LON*'
# use str.replace() to clean up string
# note that we have to use it twice
print(text)
Python
Setting up Python environment...
Output