I have type variable which may have been set to 'D' or 'E'

Now, which one of following statements are more efficient

if type =='D' or type == 'E':

or

if re.search("D|E", type):

Please let me know because the function is going to called 10s of millions
of times.

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

Reply via email to