[1,2,3] exactly same as [1,2,3,] ?

Paul McNett p at ulmcnett.com
Thu Aug 28 19:28:03 EDT 2008


mh at pixar.com wrote:
> x=[1,2,3]
> and
> x=[1,2,3,]
> 
> are exactly the same, right?

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
}}}

Paul



More information about the Python-list mailing list