Hello to all good people

I am new to the great Py so am quite puzzled by the following code

---------------

res = []
x = [ 1, 1 ]
for i in xrange(0,5):
        res.append(x)
        x[1] = x[1] + 1
        print "x = ", x
        print "res = ", res

---------------

Looks like it puts smth like reference to 'x' into 'res' list, instead of 
value. But if I want a value should I use a different method or what ?

Evgeni

P.S. Could not easily find the issue in the manual/tutorial can you point 
me out to smth relevant ?

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to