Functions and Modules
Appearance
def make_shirt(size = "L", slogan = "I love Python"): # two params both with default values
"""Generate a T-shirt order with size and slogan """ # for documentation of function purpose
print(f"\nYou ordered a T-shirt saying '{slogan}' in size {size}.\n")
make_shirt() # call with defaults
make_shirt("M") # call with size only
make_shirt(slogan = "I like Python") # call with slogan only (must specify param name)
make_shirt(size = "S", slogan = "I like Python") # call with both size and slogan