'How to convert a string value to float value
I have these quantities and i want to transform it to a float variable, but i have to quit the letter at the end, I tried like the next code:
A=6574.6A
B=977.020A
C=1085.00A
D=33.133A
s=float(A)
print(s)
But it doesn't work, because I have a until the end. How could I remove the letter and just have the numeric value? I can't remove it manually because I have a huge list of values.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
