title: Printing a formatted Float list in Python3
body: <p>I am writing a program that does the following:</p>
  
  <ol>
  <li>Takes multiple inputs (floating point) delimited by commas</li>
  <li>Performs a calculation on all the elements of the list</li>
  <li>Outputs a list (floating point with two decimal places)</li>
  </ol>
  
  <p>I have written the following program</p>
  
  <pre><code>import math
  
  C = 50.0
  H = 30.0
  Q = []
  
  D = input("Please input the D-Values\n").split(",")
  [float(k) for k in D]
  #[int(k) for k in D]
  
  print("D = {}".format(D))
  
  for i in D:
      j = (math.sqrt((2*C*float(i))/H))
      Q.append(j) 
  
  
  print("The answers are")
  print(Q)
  print(type(Q[0]))
  print("Q = {:.2f}".format(Q))
  </code></pre>
  
  <p>I am facing the following error when executing this program</p>
  
  <pre><code>Traceback (most recent call last):
    File "/home/abrar/pythonPrograms/Challange6.py", line 24, in &lt;module&gt;
      print("Q = {:.2f}".format(Q))
  TypeError: non-empty format string passed to object.__format__
  </code></pre>
  
  <p>I tried to search for the solution to this problem but could not find an answer. The program works fine if {:.2f} is not included i.e. {} is used. However, the output is then very messy looking.</p>
  
  <p>Any help is highly appreciated.</p>