What is better to use:
if var in X:
#do_whatever
elif (var in Y):
#do_whatever2
or:
if var in X:
#do_whatever
i
If you need to perform both checks, you should use two separate ifs. If you want to check one or the order you should always use elif because
Performance wise, you should also consider testing the most likely condition first.