Skip to content

Instantly share code, notes, and snippets.

@vy-nguyen
Created January 11, 2017 17:36
Show Gist options
  • Save vy-nguyen/2f0e3e930e3efdef9e5c8e458bdaf565 to your computer and use it in GitHub Desktop.
Save vy-nguyen/2f0e3e930e3efdef9e5c8e458bdaf565 to your computer and use it in GitHub Desktop.
def func1(x, y, z):
print x
print y
print z
def func2(*args):
# Convert args tuple to a list so we can modify it
args = list(args)
args[0] = 'Hello'
args[1] = 'awesome'
func1(*args)
func2('Goodbye', 'cruel', 'world!')
# Will print
# > Hello
# > awesome
# > world!
This happens simply because we're
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment