[Tutor] Can I tell me anyone about [x.lower() for x in lst]

Abhiram Singh Kushwah abhiramkushwah@rediffmail.com
3 Sep 2001 11:02:07 -0000


Hi All,

Can I tell me anyone about the following code:

>>> import string
>>> lst =3D3D ['ONE', 'TWO', 'THREE']
>>> newlst =3D3D [x.lower() for x in lst]
  File "<stdin>", line 1
    newlst =3D3D [x.lower() for x in lst]

I am using python1.5 on Red Hat Linux 7.1.
Does  the facility "[x.lower() for x in lst]" not =

available in python1.5 ?

Thanks in advance!

Abhiram


 =