title: I'm not sure of a way to go about this task using Python code
body: <p>Using Python code I cannot find a simple way to answer this task:</p>
  
  <blockquote>
    <p>Write a program that randomly generates a 4 digit passcode, then gets
    the user to try and guess the passcode. The code must then tell the
    user how many digits were correct in there guessed passcode.they can
    guess 12 times before they lose or, guess correctly within 12 tries to
    win.</p>
  </blockquote>
  
  <p>Please help write a python code for this task. The main part that I'm stuck on is how to separate the digits to check them without putting spaces between them and then using the split command.</p>