mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-12-23 09:41:36 +00:00
Fixed whitespaces
Fixed the spacing to conform with standards.
This commit is contained in:
parent
7184d7b61d
commit
5225372045
@ -158,7 +158,7 @@ print("I'm Python. Nice to meet you!")
|
||||
|
||||
# By default the print function also prints out a newline at the end.
|
||||
# Use the optional argument end to change the end character.
|
||||
print("I'm Python. Nice to meet you!", end="")
|
||||
print("Hello, World", end="!") # => Hello, World!
|
||||
|
||||
# No need to declare variables before assigning to them.
|
||||
# Convention is to use lower_case_with_underscores
|
||||
@ -501,9 +501,8 @@ all_the_args(*args, **kwargs) # equivalent to foo(1, 2, 3, 4, a=3, b=4)
|
||||
|
||||
# Returning multiple values (with tuple assignments)
|
||||
def swap(x, y):
|
||||
return y, x # Return multiple values as a tuple
|
||||
return y, x # Return multiple values as a tuple without the parenthesis.
|
||||
# (Note: parenthesis have been excluded but can be included)
|
||||
# return (y, x) # Just as valid as the above example.
|
||||
|
||||
x = 1
|
||||
y = 2
|
||||
|
Loading…
Reference in New Issue
Block a user