Created
November 16, 2016 23:23
-
-
Save gerow/decfd75d803aa88e797f87cd6d64fc92 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gerow@gerow0:~$ python | |
Python 2.7.6 (default, Jun 22 2015, 17:58:13) | |
[GCC 4.8.2] on linux2 | |
Type "help", "copyright", "credits" or "license" for more information. | |
>>> l = ['why are lists pass by reference by default in python?'] | |
>>> def f(l): | |
... l.append('because fuck you') | |
... | |
>>> f(l) | |
>>> l | |
['why are lists pass by reference by default in python?', 'because fuck you'] | |
>>> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment