title: first time programming-exercise
body: <p>First time programming ever... I'm trying to do this exercise to.. :</p>
  
  <p>Write a program that prints the longest substring of s in which the letters occur in alphabetical order. For example, if s = 'azcbobobegghakl', then your program should print</p>
  
  <p>Longest substring in alphabetical order is: beggh</p>
  
  <p>I was here..before starting to freak out:</p>
  
  <pre><code>s = 'abcdezcbobobegghakl'
  n = len(s) 
  x = 0
  
  
  x += 1
  lengh = s[x-1]
  if s[x] &gt;= s[x-1]:
      lengh = lengh + s[x]
  
  
  if s[x+1] &lt; s[x]:
      n = len(lengh)
  if x &gt; n:
      break 
  
  print('Longest substring in alphabetical order is: ' + str(lengh)) 
  </code></pre>
  
  <p>I know this code is bad..I m trying to find substring in alphabetical order and is some way keep the longest one! I know could be normal, because I never programmed before but i feel really frustrated...any good idea/help??</p>