+4  A: 
if message in ("0", "3", "5", "7"):
    ...
elif message in ...

would be one way.

If message is always one character long, you could also use

if message in "0357":
    ....

But this would also be true if message == "35", therefore the warning.

Tim Pietzcker
Thanks a lot! :-)
Neverland
+1  A: 
if message in '0357' :
    ...
elif message in '12468' :
    ...
else:
    ...

In a more global way :

if value in [elem0, elem1, ... ]:
    ...
Matthieu Gautier
Thanks a lot! :-)
Neverland