I'm extracting an int from a table but amazingly comes as a string with multiple full stops. This is what I get:
p = '23.4565.90'
I would like to remove the last dots but retain the first one when converting to an in. If i do
print (p.replace('.',''))
all dot are removed How can I do this.
N/B Tried a long way of doing this
p = '88.909.90000.0'
pp = p.replace('.','')
ppp = list(''.join(pp))
ppp.insert(2, '.')
print (''.join(ppp))
BUT discovered that some figures come as e.g. 170.53609.45 and with this example, I'll end up with 17.05360945 instead of 170.5360945