Skip to content

Instantly share code, notes, and snippets.

@werterzz
Created November 8, 2022 16:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save werterzz/73d6316f4e4ec5c5452478c4a15aac8f to your computer and use it in GitHub Desktop.
Save werterzz/73d6316f4e4ec5c5452478c4a15aac8f to your computer and use it in GitHub Desktop.
create grill function receive 1 argument
# create grill function receive 1 argument
grill = lambda food: "grilled " + food
print(grill('beef'))
# output: grilled beef
# create cook function receive 2 arguments
cook = lambda cook, food: cook + " " + food
print(cook("boil", "egg"))
# output: boil egg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment