title: What does {0} mean in this Python string?
body: <p>The following program uses {0} in a string, and I'm not sure how it works, it came up in an online tutorial about iteration for Python, and I can't seem to find anywhere explaining it.  </p>
  
  <pre class="lang-cpp prettyprint-override"><code>import random
  
  number = random.randint(1, 1000)
  guesses = 0
  
  print("I'm thinking of a number between 1 and 1000.")
  
  while True:
     guess = int(input("\nWhat do you think it is? "))
     guesses += 1
  
      if guess &gt; number:
          print("{0} is too high.".format(guess))
      elif guess &lt; number: 
          print("{0} is too low.".format(guess))
      else:
          break
  
  print("\nCongratulations, you got it in {0} guesses!\n".format(guesses))
  </code></pre>
  
  <p>Thank you!</p>