Last active
December 20, 2015 07:29
-
-
Save myano/6094059 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| #!/usr/bin/env python | |
| ## source available at: http://git.io/MYVymw | |
| def try_to_change_list_contents(the_list): | |
| print 'got', the_list | |
| the_list.append('four') | |
| print 'changed to', the_list | |
| outer_list = ['one', 'two', 'three'] | |
| print 'before, outer_list =', outer_list | |
| try_to_change_list_contents(outer_list) | |
| print 'after, outer_list =', outer_list |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment