title: Limit complex string length using f string
body: <p>With the following code i can interpolate a string within a limit length:</p>
  
  <pre><code>HEADER_LENGTH = 10
  message = "Hello"
  
  header = f"{len(message):&lt;{HEADER_LENGTH}}"
  
  </code></pre>
  
  <p>That way <code>header</code> is a <code>string</code> with <code>max_length = 10</code></p>
  
  <p>So the return of the code will be:</p>
  
  <pre><code>#print(header)
  &gt;&gt;&gt; 5
  
  #print(len(header))
  &gt;&gt;&gt; 10
  </code></pre>
  
  <p>I'm trying to do something like this:</p>
  
  <pre><code>HEADER_LENGTH = 10
  message = "Hello"
  word = "foo"
  
  #just example it doesn't work
  header = f"{{word} {len(message)}}:&lt;{HEADER_LENGTH}"
  
  </code></pre>
  
  <p>And the expected output will be:</p>
  
  <pre><code>#print(header)
  &gt;&gt;&gt; foo 5
  
  #print(len(header))
  &gt;&gt;&gt; 10
  </code></pre>
  
  <ul>
  <li>There are any way to do this using f string?</li>
  <li>If not, how can I achieve this?</li>
  </ul>