title: compare two python strings that contain numbers
body: <p>UPDATE: I should have specified this sooner, but not all of the names are simply floats. For example, some of them are "prefixed" with "YT". So for example" YT1.1. so, you have the same problem YT1.9 &lt; YT1.11 should be true. I'm really surprised that the string comparison fails....</p>
  
  <p>hello,
  this should be a pretty simple question but I can't seem to find the answer. I'd like to sort a bunch of XL worksheets by name. Each of the names are numbers but in the same way that textbook "sections" are numbered, meaning section 4.11 comes after 4.10 which both come after 4.9 and 4.1. I thought simply comparing these numbers as string would do but I get the following:</p>
  
  <pre><code>&gt;&gt;&gt; s1 = '4.11'
  &gt;&gt;&gt; s2 = '4.2'
  &gt;&gt;&gt; s1&gt; s2
  False
  &gt;&gt;&gt; n1 = 4.11
  &gt;&gt;&gt; n2 = 4.2
  &gt;&gt;&gt; n1 &gt; n2
  False
  </code></pre>
  
  <p>how can I compare these two values such that 4.11 is greater than 4.2?</p>