Python interview question #1: Mutable vs. immutable

preview_player
Показать описание
We say that some Python data structures are mutable, while others are immutable. What does this mean?

In this lesson from "Ace Python Interviews," I show you what "mutable" and "immutable" mean in the world of Python, and why they're so important. You'll be able to answer this question when they ask you in an interview.

Рекомендации по теме
Комментарии
Автор

🤔 Do you now understand what "mutable" means in Python?

👇 Still have questions? Drop them in the comments — I read them all.

📝 Want the course notebooks and practice materials?

ReuvenLerner
Автор

A good way to check if it’s the same or different object is to check the id of the object.
> a = [1, 2, 3, 4]
>id(a)

MagnusAnand
Автор

Hi! Great videos! Question: when the original variable s (s = 'abcde') was orphaned after you ran s += 'f'... what happened to the original 'abcde' in memory? Did it get removed? If I'm not mistaken Java has garbage collection features that C++ doesn't have, but does Python do something like that too? Can you maybe make a video on this? Thanks!

sam-friedman
visit shbcf.ru