1x = [[foo for i in range(10)] for j in range(10)]
2# x is now a 10x10 array of 'foo' (which can depend on i and j if you want)
3
1>>> b = [['a']*3]*3
2>>> b
3[['a', 'a', 'a'], ['a', 'a', 'a'], ['a', 'a', 'a']]
4>>> b[1][1]
5'a'
6>>> b[1][1] = 'b'
7>>> b
8[['a', 'b', 'a'], ['a', 'b', 'a'], ['a', 'b', 'a']]
9
1x = [[foo for i in range(10)] for j in range(10)]
2# x is now a 10x10 array of 'foo' (which can depend on i and j if you want)