Interview Question

What are functions in Python?

Functions package reusable behavior and return values.

💡 Concept ✅ Quick Revision 🐍 Python

Answer

A Python function is a callable object normally created with def or lambda. • Parameters receive argument values when the function is called. • A return statement supplies the call result. • Without an explicit return value, a function returns None.

💡 Simple Example

def add(a, b): return a + b print(add(2, 3))

Output

5

⚡ Quick Revision

Functions package reusable behavior and return values.