title: Why do the first two inputs I enter when I run my program repeat in the text file?
body: <p>I'm trying to make a flash card generator, and I'm having trouble gathering the inputs from the text file. When the program asks the user for the questions and answers, it drops the information into a text file that will be used later, when the user wishes to review the information. However, whenever the program runs for the first time, the first two inputs are repeated twice in the text file.</p>
  <p>An example of this bug is like so:</p>
  <pre><code>What is the capitol of New York, RochesterWhat is the Capitol of New York, Rochester .
  </code></pre>
  <p>Here is the code I've written to achieve my task:</p>
  <pre class="lang-py prettyprint-override"><code>user_inputs = []
  f = open('flash_card.txt', 'a')
  print('Hello! Welcome to Flash Card Study Helper:)')
  create_add = input('Do you wish to create new cards? ')
  while create_add == ('yes'):
      question = input('Please type out the question: ')
      answer = input('Please type out the answer: ')
      combined = ','.join(user_inputs)
      f.write(combined+'\n')
      user_inputs.append(combined)
      create_add =input('Do you wish to create another card? ')
  else:
     print(user_inputs)
  </code></pre>
  <p>Why do my inputs duplicate when written into the file?</p>