Guest User

Untitled

a guest
Jan 21st, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. def cheeseshop(kind, *arguments, **keywords):
  2. print("-- Do you have any", kind, "?")
  3. print("-- I'm sorry, we're all out of", kind)
  4. for arg in arguments:
  5. print(arg)
  6. print("-" * 40)
  7. keys = sorted(keywords.keys())
  8. for kw in keys:
  9. print(kw, ":", keywords[kw])
  10.  
  11. cheeseshop("Limburger", "It's very runny, sir.",
  12. "It's really very, very runny, sir.",
  13. shopkeeper="Michael Palin",
  14. client="John Cleese",
  15. sketch="Cheese Shop Sketch")
  16. '''Output
  17. -- Do you have any Limburger ?
  18. -- I'm sorry, we're all out of Limburger
  19. It's very runny, sir.
  20. It's really very, very runny, sir.
  21. ----------------------------------------
  22. client : John Cleese
  23. shopkeeper : Michael Palin
  24. sketch : Cheese Shop Sketch
  25. '''
Add Comment
Please, Sign In to add comment