title: How would I use the if statement with a variable?
body: <p>I am experimenting with Python, and I'm currently making a little code type thing. It randomly spits out a five digit code, and asks you for it.</p>
  <pre><code>import random
  Code = random.randint() #random digits
  print(&quot;Your Code is &quot;, Code)
  </code></pre>
  <p>And I started working on an if statement to clarify if the code is correct.</p>
  <pre><code>A = input(&quot;Please enter your code: &quot;)
  if A == Code: #problem here
      print(&quot;Correct!&quot;)
  else:
      print(&quot;Fail!&quot;)
  </code></pre>
  <p>I just don't know how to make the variable itself, if that makes sense, the statement.</p>
  <p>Sorry if this was confusing, I am quite new to this and don't exactly know how to explain things...</p>