title: Multi-line string indentation with .format()
body: <p>I'm supposed to create a receipt in string format, which will then be passed back to the main program, which then prints it.</p>
  
  <p>So, I have two strings which contain the prices with \n in between each one:</p>
  
  <pre><code>food_prices = "\n22.40\n13.40\n"
  drink_prices = "\n11.50\n6.90\n"
  </code></pre>
  
  <p>They were created from lists with float values - I tried to do this with for-loops, but I never got it to work; all I got were incredibly buggy prints after the receipt string was passed on to the main program.</p>
  
  <p>I'm trying to get them formatted with .format() so that each is printed on a line of its own (due to the \n), indented to the right with 16 spaces of "room". Example of what the output is supposed to be:</p>
  
  <pre><code>1234567890123456 # For readability, ignore
  Food:
             22.40
             13.40
  Drinks:
             11.50
              6.90
  ------------------------------
  Total      54.20
  </code></pre>
  
  <p>What I have tried:</p>
  
  <pre><code> receipt = (...
          "Food:\n"
          "{:&gt;16}"
          "Drinks:\n"
          "{:&gt;16}"
          "------------------------------\n"
          "{:&gt;7.2f}"
          "Total {:&gt;7.2f}\n").format(food_prices, drink_prices, total)
  </code></pre>
  
  <p>What the output looks like:</p>
  
  <pre><code>Food:
   12.4
  5.43
  7.65
  Drinks:
     5.4
  8.76
  5.4
  ------------------------------
  Total      45.04 
  </code></pre>
  
  <p>The indentation does work with only a single price in the string ("\n0.00\n"), though. I'm not exactly sure how this should/could be done. I've referenced the official documentation (and PEP) and done some Googling.</p>