title: finding the longest substring of letters in alphabetical order in a given string
body: <p>When executing my code for the given task, I keep getting the longest string plus the next letter in the iteration. For example, if I use </p>
  
  <pre><code>s = 'azcbobobegghakl' 
  </code></pre>
  
  <p>I will get <code>"beggha"</code> as the longest string, when the answer is supposed to be <code>"beggh"</code>. This same bug occurs for all strings of random letters I tried. </p>
  
  <p>I have figured out that the extra letter gets added on after the "result += letters" statement, but I'm not sure how to fix it. Here is my code:</p>
  
  <pre><code>s = 'azcbobobegghakl'
  result = []
  final = []
  for letters in s:
      result += letters
      if result == sorted(result) and len(result) &gt;= len(final):
          final=result
      elif result != sorted(result): 
          result = [result[len(result)-1]]
  print "".join(final)
  </code></pre>