On Fri, Aug 29, 2008 at 9:28 AM, Paul McNett <[EMAIL PROTECTED]> wrote: > When confronted with this type of question, I ask the interpreter: > > {{{ > mac:~ pmcnett$ python > Python 2.5.2 (r252:60911, Feb 22 2008, 07:57:53) > [GCC 4.0.1 (Apple Computer, Inc. build 5363)] on darwin > Type "help", "copyright", "credits" or "license" for more information. >>>> [1,2,3] == [1,2,3,] > True > }}}
I must point out though that although they contain the same elements/data, they are not the same object/instance. {{{ #!python >>> x = [1, 2, 3] >>> y = [1, 2, 3] >>> id(x) 3083095148L >>> id(y) 3082953324L >>> x == y True }}} If you view the documentation for a list: {{{ #!sh $ pydoc list }}} list's have an __eq__ that is used to compare the equality of 2 lists. cheers James -- -- -- "Problems are solved by method" -- http://mail.python.org/mailman/listinfo/python-list