Tajamul Khan
@Tajamulkhann
1. What is Python and what are its
key features?
Python is a high-level, interpreted
programming language known for:
Easy-to-read syntax
n n
Dynamic typing
h a
Garbage collection
u l k
m
Extensive standard library
ja
a
Support for multiple programming
T
@ paradigms (OOP, functional, procedural)
Portable and platform-independent
Strong community support and
comprehensive documentation
@Tajamulkhann
2. Explain the difference between
lists and tuples.
Lists
Mutable (can be modified after creation)
Defined using square brackets: [1, 2, 3]
Memory overhead is larger
n n
h a
Better for data that changes frequently
u l k
Tuples
ja m
a
Immutable (cannot be modified after
T
@ creation)
Defined using parentheses: (1, 2, 3)
More memory efficient
Faster iteration than lists
Can be used as dictionary keys (lists
cannot)
@Tajamulkhann