diff options
author | Cornel Punga <cornel.punga@gmail.com> | 2015-03-24 12:29:01 +0200 |
---|---|---|
committer | Cornel Punga <cornel.punga@gmail.com> | 2015-03-24 12:29:01 +0200 |
commit | 7e7a60d47ce0113e1a5b4ee8642984c60a08f569 (patch) | |
tree | 170495f5108669155aa923a2ed38c52e70482e15 | |
parent | c8237baf36b9ad182a34402f0a32a1e60adb9776 (diff) |
Update python3.html.markdown. Changes to spacing and online resources
1. Some changes related to spacing
2. Added an online resource
-rw-r--r-- | python3.html.markdown | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/python3.html.markdown b/python3.html.markdown index 0293d7d2..e8913267 100644 --- a/python3.html.markdown +++ b/python3.html.markdown @@ -276,7 +276,7 @@ empty_set = set() # Initialize a set with a bunch of values. Yeah, it looks a bit like a dict. Sorry. some_set = {1, 1, 2, 2, 3, 4} # some_set is now {1, 2, 3, 4} -#Can set new variables to a set +# Can set new variables to a set filled_set = some_set # Add one more item to the set @@ -394,7 +394,6 @@ our_iterator.__next__() # Raises StopIteration list(filled_dict.keys()) #=> Returns ["one", "two", "three"] - #################################################### ## 4. Functions #################################################### @@ -410,7 +409,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. - # You can define functions that take a variable number of # positional arguments def varargs(*args): @@ -418,7 +416,6 @@ def varargs(*args): varargs(1, 2, 3) # => (1, 2, 3) - # You can define functions that take a variable number of # keyword arguments, as well def keyword_args(**kwargs): @@ -636,6 +633,7 @@ print(say(say_please=True)) # Can you buy me a beer? Please! I am poor :( * [The Official Docs](http://docs.python.org/3/) * [Hitchhiker's Guide to Python](http://docs.python-guide.org/en/latest/) * [A Crash Course in Python for Scientists](http://nbviewer.ipython.org/5920182) +* [Python Course](http://www.python-course.eu/index.php) ### Dead Tree |