Post List
-
Lists vs Tuples vs Sets vs Dictionnaries in Python
đˇ Introduction
If you're preparing for a Python coding interview, one of the first questions you'll face is:
"Wich data structure would you use for this problem, and why?"
Python offers four fundamental built-in data structures:
- List - ordered, mutable sequence.
- Tuple - ordered, immutable sequence.
- Set - unordered, unique elements.
- Dictionary - key-value mapping.
At first glance, they might feel interchangeable. But âĻ
-
Mutable and Immutable types in Python
đˇ Introduction
If you're preparing for Python coding interviews, you've probably heard the terms mutable and immutable. They may sound abstract, but they play a huge role in how Python works under the hood, and understanding them can save you from subtle bugs.
in this post, we'll explore:
- What mutability means in Python
- Which built-in types are mutable vs immutable
- Common interview pitfalls
- Why this concept âĻ
-
List and Array in Python
The List is one of the built-in data type in Python. The four collection data types are: list, tuple, set and dictionary.
Page 1 of 2
Next