Python_Viva_Questions_Answers
Python_Viva_Questions_Answers
Q: What is Python?
A: Python is a high-level, interpreted programming language known for its simplicity and readability.
A: Easy to learn, interpreted, dynamically typed, supports OOP, extensive standard libraries, and
portable.
A: Lists are mutable and use square brackets [], while tuples are immutable and use parentheses ().
A: It ensures that code runs only when the script is executed directly, not when imported.
A: '==' checks for value equality, 'is' checks for identity (same memory location).
Q: What is a function?
A: append() adds a single element, extend() adds multiple elements from an iterable.
A: Special methods with double underscores like __init__, __str__, __len__, etc.
A: A feature that allows a class to derive properties and methods from another class.