Advertisement
Guest User

Untitled

a guest
Feb 20th, 2020
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.33 KB | None | 0 0
  1. """
  2. This program does the following:
  3. 1. cleans up the white space on both sides
  4. 2. replaces "g" with "z" and
  5. 3. replaces " " with "!"
  6. """
  7. def fancy_cleanup(edit):
  8.     print(edit.strip().replace("g", "z").replace(" ", "!"))
  9.    
  10. fancy_cleanup("       grenade            ")
  11. fancy_cleanup("      all over to you              ")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement