Equality versus identity in Python

Опубликовано: 28 Май 2024
на канале: Python Morsels
359
30

Equality checks whether two objects represent the same value. Identity checks whether two variables point to the same object.

Equality is checked with "==" and identity is checked with "is".

Article at https://pym.dev/equality-vs-identity/

More #Python screencasts at https://pym.dev/screencasts/

00:00 The equality operator in Python
00:45 The "is" operator in Python
01:34 How equality and identity work differently?
02:21 Inequality and non-identity operators
02:47 Where are identity checks used?
03:28 Equality vs. Identity


Смотрите видео Equality versus identity in Python онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Python Morsels 28 Май 2024, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 359 раз и оно понравилось 30 людям.