fix(guide): simplify directory structure

This commit is contained in:
Mrugesh Mohapatra
2018-10-16 21:26:13 +05:30
parent f989c28c52
commit da0df12ab7
35752 changed files with 0 additions and 317652 deletions

View File

@ -0,0 +1,26 @@
---
title: Difference between Python 'is' and '==' operators
---
`is` is a check for object identity - ie, checking if two or more variables are referring to the same object. You can't overload `is`.
`==` evaluates to true if object referred to by the variables are equal. You can overload `==` via the `__eq__` operator.
## Return Value
The return value for both would be either `True` or `False`.
## Code Sample
a = 2.3
a is 2.3 # => False
a == 2.3 # => True
a = [234,123,321]
b = [234,123,321]
a == b # => True
a is b # => False
a = b
a == b # => True
a is b # => True, because if we change a, b changes too