So I have a number like 7.50x, which I want to convert to 7.5x. I thought about using regular expressions. I can easily match this expression, for example by using re.search('[0-9].[0-9]0x', string). However, I'm confused how to replace every such number using the re.sub method. For example what should be there as the second argument?
re.sub('[0-9].[0-9]0x', ?, string)