title: Why is this input asking 2 times?
body: <p>Can someone explain why when I run this it asks for input 2 times when I say to create another save file?
  I'm  using python 3.9.1 on a mac with default python IDLE.</p>
  <p>Here is my code:</p>
  <pre><code>import pickle
  names = []
  count = 0
  times = 1
  a = &quot;false&quot;
  gameplayfunc = &quot;false&quot;
  while (count &lt; 9):
      for i in range(times):
          names.append(input('Please enter save file name: '))
      x = input(&quot;Would you like to create another save file?&quot;)
      if x == &quot;Yes&quot; or x == &quot;yes&quot; or x == &quot;YES&quot;:
          names[i]
          pickle.dump( x, open( names[i], &quot;wb&quot; ) )
          times = times + 1
          a == &quot;true&quot;
      elif x == &quot;No&quot; or x == &quot;no&quot; or x == &quot;NO&quot;:
          namee = names[i] + json
          pickle.dump( x, open( namee, &quot;wb&quot; ) )
          gameplayfunc = &quot;true&quot;
          count = 10
  while a == &quot;true&quot;:
      count = 10
      count = 1
      a == &quot;false&quot;
      
  ...
  
  for i in range(times):
      print(names[i])
  </code></pre>