summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorLevi Bostian <levi.bostian@gmail.com>2015-03-24 09:48:41 -0500
committerLevi Bostian <levi.bostian@gmail.com>2015-03-24 09:48:41 -0500
commit928afcc4c735c64682b07a52d20baf437cef1316 (patch)
tree3d4218fbe85d317859eb05aa2b409c1078dfcf08
parent0332828c95967c59ef952e4e8e21161a689d0ab1 (diff)
parent7e7a60d47ce0113e1a5b4ee8642984c60a08f569 (diff)
Merge pull request #1015 from nero-luci/patch-2
Update python3.html.markdown. Changes to spacing and online resources
-rw-r--r--python3.html.markdown6
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