Update python3.html.markdown. Changes to spacing and online resources

1. Some changes related to spacing
2. Added an online resource
This commit is contained in:
Cornel Punga 2015-03-24 12:29:01 +02:00
parent c8237baf36
commit 7e7a60d47c

View File

@ -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