I have this piece of code:
grams = float(order_weight[2].rstrip("g"))
Which is inside a bsoup function that looks for the grams on one page. The format of the grams is: X,XXX.XX. By that I mean, uses comma for the thousands, and dots for the decimals.
I keep getting errors:
invalid literal for float(): 1,759.33
The number is a example. Is that becuase the comma should be where the dot is and other way around? Can I change it only on this sentence?
Thanks in advance.