×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Python
Posted by: Matthew J_
Added: Jun 23, 2022 10:04 AM
Views: 1
Tags: no tags
  1. def make_sandwich(*items):
  2.     """Make a sandwich with the given items."""
  3.     print("\nI'll make you a great sandwich:")
  4.     for item in items:
  5.         print("  ...adding " + item + " to your sandwich.")
  6.     print("Your sandwich is ready!")
  7.  
  8. make_sandwich('roast beef', 'cheddar cheese', 'lettuce', 'honey dijon')
  9. make_sandwich('turkey', 'apple slices', 'honey mustard')
  10. make_sandwich('peanut butter', 'strawberry jam')