title: How to find the longest string in a list of lists of strings?
body: <p>How to find the longest string in a list?</p>
  
  <p>This list has both strings and list of strings.</p>
  
  <p>a set of strings, but the weirdness comes in that the strings I'm checking are in lists and those lists are mixed in with strings in a larger list.</p>
  
  <p>Example value for 'entries':</p>
  
  <pre><code>extries = [["this is text", "more text"], "another string"]
  </code></pre>
  
  <p>python code</p>
  
  <pre><code>length = 0
  for i in entries:
          if(type(i) is list):
              for x in i:
                  x = str(x)
              if length &lt;&lt; len(max(i, key = len)):
                  length = len(max(i, key = len))
          else:
              for i in entries:
                  i = str(i)
                  if length &lt;&lt; len(i):
                      length = len(i)
  </code></pre>
  
  <p>This should make</p>
  
  <pre><code>length = len(max(["this is text","more text","another string"])
  </code></pre>
  
  <p>but it is making <code>length = 0</code>.</p>