title: Syntax error from handling write to new file from a list
body: <p>So I want to write a program that writes 10 random numbers into a text file: </p>
  
  <pre><code>import random
  SIZE = 10
  
  for i in range (0, SIZE, 1):
      y = random.randrange(0,100)
  
  x = open("data.txt","w+")
  x.write("\n")
  for i in range (0, SIZE, 1):
      x.write("Results: %d", %(y))
  
  x.close()
  </code></pre>
  
  <p>I got a syntax error in the "%(y)". But I have no idea what causes it.</p>