Difference between == and is operator in Python | Python Discourse | Episode 1 | #AskMeAnything

preview_player
Показать описание
In this first episode of Python Discourse, we are going to discuss the difference between the equality operator (==) and identity operator ( is ) in Python. This is a matter of huge discussion and confusion among the Python beginners and is a very crucial topic to cover.

Both the equality and identity operators are going to be discussed for 3 different data types.
1) Lists
2) Integers
3) Strings

We are also going to discuss the best practice of dealing with these operators.

If you have any doubts, put them down in the comment section. I will come back to those through a video.

For more Python videos, check out -

If you like my work and you want me to keep continuing, please support my work. Become my patron. Your donation might be a small amount, but it is of huge importance to me.

One of the most fascinating articles I read about comparing the equality and identity operator for strings is mentioned below. Check it out if you are more interested.
Рекомендации по теме
Комментарии
Автор

You are awesome....PythonGuru....best video that illustrates the "is" operator so well

nrini
Автор

Nice one! Just experiment on my jupyter, it clarify my some concepts. Thanks a lot

kaneyxx
Автор

Hello, In Jupyter only the output shows False for 'is' operator whenever value is below than 257. But I have tried the same thing (code) in pycharm or other editors, it shows different result (i.e. True). Please verify

dhanashreedeshpande
Автор

When you're going to start oops concepts

mohanm
visit shbcf.ru