hi.

i create a list of all JPG files with:
>>> list = glob.glob('*.JPG')
the content of 'list' is now:
>>> print list
['DSC00001.JPG', 'DSC00002.JPG', 'DSC00003.JPG']

but what i want is this type of list:
['DSC00001', 'DSC00002', 'DSC00003']
i.e. the names w/o the file extension.

what's the easiest way of doing this?

marc

---------------------------------------------------------------------------------------
The apocalyptic vision of a criminally insane charismatic cult leader 

   http://www.marcbuehler.net
----------------------------------------------------------------------------------------


                
__________________________________ 
Yahoo! Music Unlimited 
Access over 1 million songs. Try it free.
http://music.yahoo.com/unlimited/
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to