Skip to content

Instantly share code, notes, and snippets.

@PCManticore
PCManticore / gotcha.py
Last active August 29, 2015 14:20 — forked from vtemian/gotcha.py
# mutable list
def foobar(arg_string="abc", arg_list=[]):
print arg_string, arg_list
arg_string = arg_string + "xyz"
arg_list.append("F")
for i in range(4):
foobar()