py
py
A list in Python is a mutable, ordered collection of elements. It can store items of di erent data
types — like integers, strings, or even other lists.
# 1) Create a List
my_list = [10, 20, 30, 40, 50]
print("Original List:", my_list)
tuple
A tuple is a built-in data structure in Python that stores multiple items in a single variable. It is:
• Ordered (items have a de ned position)
• Immutable (cannot be changed after creation)
• Allows duplicate values
• Can contain elements of di erent data types
sets
1⃣ Union (set1.union(set2))
• Meaning: Combines all unique elements from both sets.
• ✅ Duplicates are removed automatically.
2⃣ Intersection (set1.intersection(set2))
• Meaning: Gives only the elements that are common in both sets.
lambda
👉 A lambda is just a shortcut way to write a small function in one line — without giving it a
name.
pandas
Pandas is a popular open-source library in Python used for data manipulation and analysis. It
provides data structures and functions needed to e ciently work with structured data, such as
ff
ff
ff
fi
ff
ff
ffi
ff
tables (like spreadsheets or SQL tables). Pandas is widely used for tasks like data cleaning,
transformation, and exploration.