title: TypeError: unsupported operand type(s) for %: 'NoneType' and 'str'
body: <p>So I am VERY new to programming and I started with Python 3. I started reading "Learn Python the Hard Way". Now, I got to a point where I had this code:</p>
  
  <pre><code>x = "There are %d types of people." % 10
  binary = "binary"
  do_not = "don't"
  y = "Those who know %s and those who %s" % (binary, do_not)
  
  print(x)
  print(y)
  print("I said: %r") % x
  </code></pre>
  
  <p>I do not really know the difference between <code>%r</code>, <code>%s</code> and <code>%d</code>. The error I get is <code>TypeError: unsupported operand type(s) for %: 'NoneType' and 'str'</code> No idea what to do and how to fix it. Please explain how I can actually make it work and why it won't work. Also, what is the difference between %r,d and s? Any useful links? Thank you in advance.</p>