foo = [[nil]*5]*5foo[0][0] = 'bar'p foo
Standard input is empty
[["bar", nil, nil, nil, nil], ["bar", nil, nil, nil, nil], ["bar", nil, nil, nil, nil], ["bar", nil, nil, nil, nil], ["bar", nil, nil, nil, nil]]
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!