Contribute Media
A thank you to everyone who makes this possible: Read More

How to make a function

Description

To define a function in Python, use the def keyword with the function name and any accepted arguments (in parentheses). Functions have inputs (arguments) and an optional output (the return value).

Details

Improve this page