def mutate(x): x[0] = 'foo' lst = ['bar']mutate(lst)print lst
Standard input is empty
['foo']
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!