Python Interview Guide
Python Interview Guide
11. What are Python functions, and how do you define them?
Functions are blocks of reusable code. Defined using the def keyword:
def greet(name):
return f"Hello, {name}"
@decorator
def say_hello():
print("Hello")