Interview Question

What are operators in Python?

Operators apply defined operations to Python objects.

💡 Concept ✅ Quick Revision 🐍 Python

Answer

Python operators perform arithmetic, comparison, assignment, membership, identity, Boolean, and bitwise operations. • Operator behavior can depend on operand types. • `is` checks object identity, while `==` checks equality. • `and` and `or` short-circuit and return an operand value.

💡 Simple Example

print(3 + 4) print('py' in 'python') print(None is None)

Output

7 True True

⚡ Quick Revision

Operators apply defined operations to Python objects.