summaryrefslogtreecommitdiffhomepage
path: root/python3.html.markdown
diff options
context:
space:
mode:
authorMark Green <mark@antelope.nildram.co.uk>2016-01-22 00:54:49 +0000
committerMark Green <mark@antelope.nildram.co.uk>2016-01-22 00:54:49 +0000
commit57053bc95d4166a42da8f6d1732dd21a217b073a (patch)
tree293a7775d4b46313a2ee955691141095653d4044 /python3.html.markdown
parentdef04721be506f1c7ff5ddf407f2333999570a89 (diff)
parent9a5bb286686f5dd4fb743c1bd15ad70a3c6a4a3f (diff)
Merge remote-tracking branch 'refs/remotes/adambard/master'
Diffstat (limited to 'python3.html.markdown')
-rw-r--r--python3.html.markdown4
1 files changed, 2 insertions, 2 deletions
diff --git a/python3.html.markdown b/python3.html.markdown
index 8cc03320..31b5bbe1 100644
--- a/python3.html.markdown
+++ b/python3.html.markdown
@@ -97,13 +97,13 @@ False or True # => True
1 < 2 < 3 # => True
2 < 3 < 2 # => False
-# (is vs. ==) is checks if two variable refer to the same object, but == checks
+# (is vs. ==) is checks if two variables refer to the same object, but == checks
# if the objects pointed to have the same values.
a = [1, 2, 3, 4] # Point a at a new list, [1, 2, 3, 4]
b = a # Point b at what a is pointing to
b is a # => True, a and b refer to the same object
b == a # => True, a's and b's objects are equal
-b = [1, 2, 3, 4] # Point a at a new list, [1, 2, 3, 4]
+b = [1, 2, 3, 4] # Point b at a new list, [1, 2, 3, 4]
b is a # => False, a and b do not refer to the same object
b == a # => True, a's and b's objects are equal