General Python Concepts
- What is Python?
- What are the key features of Python?
- Who developed Python and when?
- Is Python compiled or interpreted?
- What are Python’s applications?
- What are the benefits of using Python?
- What is PEP 8?
- What is Python used for?
- What are the limitations of Python?
- What is the latest stable version of Python?
- What is the difference between Python 2 and Python 3?
- How do you write a comment in Python?
- What are variables in Python?
- What are the rules for naming variables in Python?
- How do you take input from a user in Python?
- How do you print output in Python?
- What are keywords in Python?
- How do you check the data type of a variable?
- What is the difference between
=
and==
in Python? - What are data types in Python?
- What are the basic data types in Python?
- What is type casting?
- How do you convert a string to an integer?
- What is the difference between int, float, and complex?
- How do you check the type of an object?
Operators
- What are the different types of operators in Python?
- What is the difference between
is
and==
? - What is the difference between
and
,or
, andnot
? - What are identity operators?
- What are membership operators?
✅ Control Statements
- What are if, elif, and else statements in Python?
- What is the syntax of a
for
loop? - What is the syntax of a
while
loop? - What is the difference between
break
andcontinue
? - How does
pass
work in Python?
✅ Functions
- What is a function?
- How do you define a function in Python?
- What is the difference between arguments and parameters?
- What is the use of
return
in Python? - What are default arguments?
- How are strings declared in Python?
- Are strings mutable in Python?
- How do you concatenate strings?
- How do you access characters in a string?
- What are string methods in Python?
✅ Lists
- What is a list?
- How do you create a list in Python?
- Are lists mutable?
- How do you append elements to a list?
- How do you remove elements from a list?
- What is a tuple?
- How is a tuple different from a list?
- Are tuples mutable?
- How do you access tuple elements?
- Can a tuple contain different data types?
✅ Dictionaries
- What is a dictionary in Python?
- How do you declare a dictionary?
- How do you access values in a dictionary?
- How do you add a new key-value pair to a dictionary?
- What are dictionary methods?
✅ Sets
- What is a set?
- How is a set different from a list?
- Are sets ordered?
- How do you add or remove elements from a set?
- What are set operations?
✅ Loops and Comprehensions
- What is list comprehension?
- What is the difference between list comprehension and a loop?
- Can we use
else
with afor
loop? - What is nested loop?
- What is a nested list comprehension?
✅ Error Handling
- What is an exception?
- How do you handle exceptions in Python?
- What is the syntax of try-except block?
- What is the difference between syntax error and runtime error?
- What are some common exceptions in Python?
✅ File Handling
- How do you open a file in Python?
- What modes are available to open a file?
- How do you read a file line by line?
- How do you write data to a file?
- What is the use of the
with
statement?
✅ Basic OOPs Concepts in Python
- What is Object-Oriented Programming?
- What is a class?
- What is an object?
- How do you create a class in Python?
- What is the
__init__
method?
✅ More OOPs Concepts
- What is inheritance?
- What is polymorphism?
- What is encapsulation?
- What are instance and class variables?
- What are class methods and static methods?
✅ Miscellaneous Questions
- What is the use of
id()
in Python? - What is slicing in Python?
- What are Python modules?
- What is the difference between module and package?
- How do you import a module in Python?
✅ Environment & IDE
- Which IDEs are used for Python development?
- How do you run a Python script?
- What is pip in Python?
- How do you install external packages?
- What is virtual environment in Python?