Skip to content

Instantly share code, notes, and snippets.

@BMU-Verlag
Created April 21, 2020 07:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BMU-Verlag/01a07b38e426445a600b23004fc7a000 to your computer and use it in GitHub Desktop.
Save BMU-Verlag/01a07b38e426445a600b23004fc7a000 to your computer and use it in GitHub Desktop.
def parse_price(price_text):
price_text = price_text.replace('€', '')
price_text = price_text.replace('EUR', '')
price_text = price_text.strip()
price_text = price_text.replace('.', '')
price_text = price_text.replace(',', '.')
return float(price_text)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment