May-24-2019, 09:04 PM
Maybe. From the way buff is handled on line 4, it looks like a string. You could confirm this with print(type(buff)) after line 3, print(repr(buff)) might help too. You might be able to convert that string to a floating point number, and then use the format method of strings, or the even newer f-string syntax (Python 3.6+), to control the formatting output. That might lose some precision though. You would have to modify the string before converting to a float, because that's not a format the float function recognizes.
float(buff.replace('EXP', 'E'))
might work for that.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures