You could use a set object and check for if the value is not present in the set.
if a not in {1, 2, 3, 4}:
print("Hi!")
Sets are good to use since they are unordered, and therefore are relatively quick to check for if something is or isn't in one.
If the numbers are all an equal distance away, you can use a range instead of specifying each of the numbers. However, this will be slower, especially with a larger range.
if a not in range(1, 4):
print("Hi")
If you want to know more about the Data Science then do check out the following Data Science which will help you in understanding Data Science from scratch