Another newbie-ish question.

I want to create an if statement which will check if a particular
variable matches one of the statements, and willl execute the statement
if the variable matches any of the statements.

I have tried the following (the pass is just used for testing)


if ext[1] == "mp3" or ext[1] == "mp4" or ext[1] == "ogg" or ext[1] ==
"aac" or ext[1] != "wma":
       print "we have a valid extension: " + ext[1] #here would go the
code for decoding the above
       pass


but it does not work, running the program the if statement is totally
ignored. if the variable (ext[1]) matches it does not execute the
instructions under the if statement, but also does not return anyerrors.

So how do you create proper if statements using the 'or' function (or
something similar).

thx.


P.S Please CC me as i am having email-list troubles.

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to