How about this?
>>> s="23.45678"
>>> int(float(s))
23
Or…
>>> int(Decimal(s))
23
Or…
>>> int(s.split('.')[0])
23
I doubt it’s going to get much simpler than that, I’m afraid. Just accept it and move on.
How about this?
>>> s="23.45678"
>>> int(float(s))
23
Or…
>>> int(Decimal(s))
23
Or…
>>> int(s.split('.')[0])
23
I doubt it’s going to get much simpler than that, I’m afraid. Just accept it and move on.