Keith Troell wrote: > I'm a rank beginner. I am running Python 2.3.5 on the Terminal of Mac > OSX. > > The Tutorial (5.1) mentions list.copy as a list method. When I run
Are you sure? I don't see it here: http://www.python.org/doc/2.3.5/tut/node7.html#SECTION007100000000000000000 > > scores = [1, 2, 3] > copy = scores.copy () > > I get: AttributeError: 'list' object has no attribute 'copy' You can copy a list with the list() function or by slicing: copy = list(scores) or copy = scores[:] Kent _______________________________________________ Tutor maillist - [email protected] http://mail.python.org/mailman/listinfo/tutor
