really basic newbie python : <p>any reason why this doesn't work?</p>

<pre><code>import random



answer = random.randint(2, 4)
print(answer)

txt = input("what number")
if answer == txt:
    print("correct")
</code></pre>

<p>every time I enter the correct answer, it just comes back empty (or as an else statement if I put it)
I had this working last night although now I cannot work out why it won't, PS. i've just started to learn python this week so please go easy on me </p>
