If - Or statements

tiissa tiissa at nonfree.fr
Sat Jun 11 04:18:58 EDT 2005


Patrick Down wrote:
> What about:
> 
> if True in [thefile.endswith(x) for x in
> ('mp3','mp4','ogg','aac','wma')]:

That will catch (widely used) file names such as 'tmp3' or 
'i_cant_spell_frogg'. ;)



More information about the Python-list mailing list