summaryrefslogtreecommitdiffhomepage
path: root/python.html.markdown
diff options
context:
space:
mode:
Diffstat (limited to 'python.html.markdown')
-rw-r--r--python.html.markdown12
1 files changed, 9 insertions, 3 deletions
diff --git a/python.html.markdown b/python.html.markdown
index 93fe5f25..4cfecbbd 100644
--- a/python.html.markdown
+++ b/python.html.markdown
@@ -8,6 +8,8 @@ Python was created by Guido Van Rossum in the early 90's. It is now one of the m
languages in existence. I fell in love with Python for it's syntactic clarity. It's basically
executable pseudocode.
+Feedback would be highly appreciated! You can reach me at [@louiedinh](http://twitter.com/louiedinh) or louiedinh [at] [google's email service]
+
Note: This article applies to Python 2.7 specifically, but should be applicable
to Python 2.x. Look for another tour of Python 3 soon!
@@ -134,9 +136,9 @@ except IndexError:
# (It's a closed/open range for you mathy types.)
li[1:3] #=> [2, 4]
# Omit the beginning
-li[:3] #=> [1, 2, 4]
-# Omit the end
li[2:] #=> [4, 3]
+# Omit the end
+li[:3] #=> [1, 2, 4]
# Remove arbitrary elements from a list with del
del li[2] # li is now [1, 2, 3]
@@ -167,7 +169,7 @@ tup + (4, 5, 6) #=> (1, 2, 3, 4, 5, 6)
tup[:2] #=> (1, 2)
2 in tup #=> True
-# However, you can unpack tuples into variables
+# You can unpack tuples into variables
a, b, c = (1, 2, 3) # a is now 1, b is now 2 and c is now 3
# Tuples are created by default if you leave out the parentheses
d, e, f = 4, 5, 6
@@ -407,3 +409,7 @@ j.get_species() #=> "H. neanderthalensis"
Human.grunt() #=> "*grunt*"
```
+## Further Reading
+
+Still up for more? Try [Learn Python The Hard Way](http://learnpythonthehardway.org/book/)
+