Skip to content

Instantly share code, notes, and snippets.

@myano
Last active December 20, 2015 07:29
Show Gist options
  • Select an option

  • Save myano/6094063 to your computer and use it in GitHub Desktop.

Select an option

Save myano/6094063 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
## source available at: http://git.io/prw3rg
def try_to_change_list_reference(the_list):
print 'got', the_list
the_list = ['and', 'we', 'can', 'not', 'lie']
print 'set to', the_list
outer_list = ['we', 'like', 'proper', 'English']
print 'before, outer_list =', outer_list
try_to_change_list_reference(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