def buggy(arg, result=[]): result.append(arg) print(result) buggy('a')buggy('b')
Standard input is empty
['a'] ['a', 'b']
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!