title: Python - Returning max number in an array. Errors
body: <p>I have a Python script that connects to a website via FTP and lists the current version numbers of programs located on the website. I created an array to hold the version numbers till the script would pick the largest number out of the array and tell me what it was. For example my array would usually look like this:</p>
  
  <pre><code>array = ['1.04','1.6','1.14']
  </code></pre>
  
  <p>So I used... </p>
  
  <pre><code>max_in_array = max(array) 
  </code></pre>
  
  <p>to return the largest value in the array.</p>
  
  <p>Unfortunately, I received '1.6' as the largest number when, in fact, '1.14' is the latest version number.
  The only other thing I could think to do is to cut off the '1.' from the list of arrays so that I receive:</p>
  
  <pre><code>array = ['04','6','14']
  </code></pre>
  
  <p>And then paste it back on to get the full version number. But since this website contains many versions such as '2.02.04' and '1.14.01' I don't know how to efficiently do that.</p>
  
  <p>Any help would be greatly appreciated!</p>
  
  <hr>
  
  <pre><code>os.chdir("./gnu/"+_package)
  
  pope = len(_package) + 1 ## Cuts off name of program
  char = len(_package) - 12 ## Cuts off extension ".tar.gz"
  
  for tok in glob.glob("*.tar.gz"):
      token.append(tok) ## Appends name to array
      bork = max(token) ## Gets max version number (sometimes useless)
      print bork
      char = len(bork) - 7
  
  for _gnu in glob.glob("*.tar.gz"): ## Finds only matches with .tar.gz
      _gnuapp.append(_gnu[pope:char]) ## Appends version number to array
      spoke = max(_gnuapp) ## Gets max version number
      _ver = _package + "-" + spoke + ".tar.gz" ## Compiles the package name, ver #, and extension
      _down(_user, _ver, _package) ## Opens information in download module 
  </code></pre>