title: Python: '{0.lower()}'.format('A') yields 'str' object has no attribute 'lower()'
body: <p>In Python strings have a method <code>lower()</code>:</p>
  
  <pre><code>&gt;&gt;&gt; dir('A')
  [... 'ljust', 'lower', 'lstrip', ...]
  </code></pre>
  
  <p>However, when one tries <code>'{0.lower()}'.format('A')</code>, the response states:</p>
  
  <pre><code>&gt;&gt;&gt; '{0.lower()}'.format('A')
  Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
  AttributeError: 'str' object has no attribute 'lower()'
  </code></pre>
  
  <p>Can someone help me understand why the line above throws an AttributeError in this case? This seems like it should not be an AttributeError, though I must be mistaken. Any help understanding this would be very welcome!</p>
  
  <p>Edit: I understand I can't call the lower() method inside the format call (though it'd be neat if that were possible); my question is why doing so throws an AttributeError. This error seems misleading in this case. </p>