0% found this document useful (0 votes)
3 views3 pages

Python Basics: Lists vs. Tuples Explained

Give me this book

Uploaded by

adighogare02
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views3 pages

Python Basics: Lists vs. Tuples Explained

Give me this book

Uploaded by

adighogare02
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

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

You might also like