title: Append length of string for each string in list
body: <p><strong>Input</strong></p>
  
  <pre><code>strlist = ['test', 'string']
  </code></pre>
  
  <p><strong>Desired output:</strong></p>
  
  <pre><code>strlist = [('test', 4), ('string', 6)] 
  </code></pre>
  
  <p>Attempt 1:</p>
  
  <pre><code>def add_len(strlist):
      for i, c in enumerate(strlist):
          strlist += str(len(strlist))
      return strlist
  </code></pre>
  
  <p>Attempt 2:</p>
  
  <pre><code>def add_len(strlist):
      for c in strlist:
          c += " " + str(len(c))
      return strlist
  </code></pre>
  
  <p>I realise I have the following issues:</p>
  
  <ul>
  <li><p><strong>Attempt 1:</strong> This results in an infinite loop, as the code keeps adding onto the list.  </p></li>
  <li><p><strong>Attempt 2:</strong> This does not add the value to the string, however, when I do, I get the infinite loop issue from #1.</p></li>
  </ul>
  
  <p>I believe I need to evaluate the number of elements in the list first and implement a while statement, but not quite sure how to do this.</p>