the following function is in bpnn.py def makeMatrix(I, J, fill=0.0): m = [] for i in xrange(I): m.append([fill]*J) return m I rewrite it to : def makeMatrix(I, J, fill=0.0): m=[[fill]*J]*I return m the result is defference Can someone tell me the defference between the two function?