title: Invalid Lateral for Float while scraping data with python and BeautifulSoup
body: <p>I am trying to import price of a stock from a website. It imports the price as a string but gives me below error when I try to change it to a float:</p>
  
  <blockquote>
    <p>ValueError: invalid literal for float()</p>
  </blockquote>
  
  <p>This is my code. </p>
  
  <pre><code>import requests
  from bs4 import BeautifulSoup
  
  #&lt;span class="current-price" style="color:#D22B00"&gt;1,780&lt;/span&gt;
  
  request = requests.get("http://www.sharesansar.com/company/EBL")
  
  content = request.content
  
  soup = BeautifulSoup(content, "html.parser")
  
  span_line = soup.find("span", {"class":"current-price", "style":"color:#D22B00"})
  
  price = span_line.text.strip()
  
  stock_price = float(price)
  </code></pre>