[1,2,3] exactly same as [1,2,3,] ?
Terry Reedy
tjreedy at udel.edu
Fri Aug 29 01:43:06 EDT 2008
- Previous message (by thread): [1,2,3] exactly same as [1,2,3,] ?
- Next message (by thread): [1,2,3] exactly same as [1,2,3,] ?
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
mh at pixar.com wrote:
> x=[1,2,3]
> and
> x=[1,2,3,]
>
> are exactly the same, right?
Yes, so you can write something like either your second example or
l = [
kjasldfjs,
kjsalfj,
ksjdflasj,
]
and insert items without worrying about leaving out the comma (less of a
problem with 'horizontal' list), or delete the last line and not have to
worry about deleting the comma on the line before.
- Previous message (by thread): [1,2,3] exactly same as [1,2,3,] ?
- Next message (by thread): [1,2,3] exactly same as [1,2,3,] ?
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Python-list
mailing list