What keyword is used to define a function in Python?
- def
- define
- func
- function
In Python, the keyword used to define a function is 'def.' You start a function definition with 'def,' followed by the function name and its parameters.
Loading...
Related Quiz
- In Flask, the ____ function is used to render a template and send it to the client’s browser.
- What does the finally block represent in Python's exception handling?
- How do you instantiate an object from a class in Python?
- In Python, a ____ is a function that wraps another function, modifying its behavior.
- How would you organize a group of related functions into a module?