I'm trying to make something where you you are given a random number, and you are supposed to input that number. I don't know how to make python check to see if the input is the same as a variable. The current code doesn't recognize it as the variable. I've looked around and everything doesn't yield any results related to this. I'm pretty new to python, so it might just be super obvious.
import random
rand = random.randint(1000,9999)
print(rand)
question=input("What is the number?")
if question==rand:
print("That is the number.")
else:
print("That is not the number.")