title: How to convert Beautiful Soup Unicode into a decimal value?
body: <p>I'm trying to Use python's Beautiful Soup Library to grab a bunch of divs from an html file, and from there get the string - which is a money value - that's inside the div. Then remove the dollar sign and convert it to a decimal so that I can use a greater than and less than conditional statement to compare values. I have googled the heck out of it and can't seem to come up with a way to convert this unicode string into a decimal value. I really could use some help here. How do I convert unicode into a decimal value?</p>
  
  <p>This was my last attempt:</p>
  
  <pre><code>import unicodedata
  from bs4 import BeautifulSoup
  soup = BeautifulSoup(open("/Users/sm/Documents/python/htmldemo.html"))
  for tag in soup.findAll("div",attrs={"itemprop":"price"}) :
  val = tag.string
  new_val = val[8:]
  workable = int(new_val)
  if workable &gt; 250:
      print(type(workable))
  else:
      print(type(workable))
  </code></pre>
  
  <p>Edit:</p>
  
  <p>When I print the type of new_val I get  :</p>
  
  <pre><code>print(type(new_val))
  </code></pre>