On Sat, 2009-09-19 at 17:20 +0200, ad...@gg-lab.net wrote: > I want to check the extension of an uploaded file. So i've created a > list with allowed extensions: > > enabled_ext = ['gif', 'jpeg', 'png', 'bmp', 'tiff']
If this does not change make it s tuple. It does not change what is written below. > How can i create a simple if that check if the file ext (file_ext) is > in the list? The below idle session should help you figure it out. >>> enabled_ext = ('gif', 'jpeg', 'png', 'bmp', 'tiff') >>> 'gif' in enabled_ext True Greets Sander A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail? _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor