diff options
Diffstat (limited to 'python.html.markdown')
-rw-r--r-- | python.html.markdown | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/python.html.markdown b/python.html.markdown index 59a0b85c..fe8a204c 100644 --- a/python.html.markdown +++ b/python.html.markdown @@ -6,7 +6,7 @@ filename: learnpython.py --- Python was created by Guido Van Rossum in the early 90's. It is now one of the most popular -languages in existence. I fell in love with Python for it's syntactic clarity. It's basically +languages in existence. I fell in love with Python for its syntactic clarity. Its 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] @@ -328,7 +328,8 @@ def add(x, y): return x + y # Return values with a return statement # Calling functions with parameters -add(5, 6) #=> 11 and prints out "x is 5 and y is 6" +add(5, 6) #=> prints out "x is 5 and y is 6" and returns 11 + # Another way to call functions is with keyword arguments add(y=6, x=5) # Keyword arguments can arrive in any order. @@ -461,6 +462,11 @@ math.sqrt(16) == m.sqrt(16) #=> True # can write your own, and import them. The name of the # module is the same as the name of the file. +# You can find out which functions and attributes +# defines a module. +import math +dir(math) + ``` |