Python Interview Questions
1. What is Python?
Python is a high-level, general-purpose programming language known for readable syntax and a large ecosystem.
2. Is Python dynamically typed?
Yes. Python determines the type of an object at runtime, and a variable can refer to objects of different types.
3. What is the difference between a list and a tuple?
A list is mutable, while a tuple is immutable.
4. What is a dictionary?
A dictionary stores data as key-value pairs.
5. What is a function?
A function is a reusable block of code designed to perform a specific task.
6. What is OOP?
Object Oriented Programming is a programming approach based on classes and objects.
7. What is exception handling?
Exception handling allows a program to handle runtime errors without unexpectedly stopping.
8. What is the difference between == and is?
== compares values, while is checks object identity.
9. What is a module?
A module is a Python file containing reusable code.
10. What is PEP 8?
PEP 8 is the Python style guide containing recommendations for writing readable Python code.