Delete all list entries of length unknown

r rt8396 at gmail.com
Mon Oct 12 05:52:04 CEST 2009


On Oct 4, 11:05 pm, "Mark Tolonen" <metolone+gm... at gmail.com> wrote:
> "Chris Rebert" <c... at rebertia.com> wrote in message
> > Tuples are immutable (i.e. they cannot be modified after creation) and
> > are createdusingparentheses.
>
> Slight correction: tuples are createdusingcommas.  Parentheses are only
> needed to disambiguate from other uses ofcomma:
>
> Python 2.6.2 (r262:71605, Apr 14 2009, 22:40:02) [MSC v.1500 32 bit (Intel)]
> on win32
> Type "help", "copyright", "credits" or "license" for more information.>>> a=1,
> >>> a
> (1,)
> >>> a=1,2,3
> >>> a
>
> (1, 2, 3)

uhh? what python you using?

>>> t = ()
>>> t
()
>>> type(t)
<type 'tuple'>

;-)



More information about the Python-list mailing list