title: Parse a string to find and remove a float
body: <p>I am created a pythod method that will take in a string of variable length, that will always include a floating point number at the end : </p>
  
  <pre><code>"adsfasdflkdslf:asldfasf-adslfk:1.5698464586546"
  </code></pre>
  
  <p>OR</p>
  
  <pre><code>"asdif adfi=9393 adfkdsf:1.84938"
  </code></pre>
  
  <p>I need to parse the string and return the floating point number at the end. There usually a delimiter character before the float, such as : - or a space.</p>
  
  <pre><code>def findFloat(stringArg):
      stringArg.rstrip()
      stringArg.replace("-",":")
  
      if stringArg.rfind(":"):
          locateFloat = stringArg.rsplit(":")
  
      #second element should be the desired float
      magicFloat = locateFloat[1]
      return magicFloat
  </code></pre>
  
  <p>I am recieving a </p>
  
  <blockquote>
    <p>magicFloat = locateFloat[1]
    IndexError: list index out of range</p>
  </blockquote>
  
  <p>Any guidence on how to locate the float and return it would be awesome.</p>