What Does "def" Mean?


#1

This is the first time I see “def” and I have no idea what it means.
Googling it just gets into very technically advanced topics
Can you explain it at the level required here?


FAQ: Learn Python - Conditionals & Control Flow - If You're Having
#2

Hi @boardsurfer28279,

def is the keyword to define a function block. A function is a piece of code you can call over and over from within your code, without rewriting it each time.

This may be a helpful resource for more information: https://www.tutorialspoint.com/python/python_functions.htm