Hitung nomor desimal Python

>>> f = "7.2332"
>>> f[::-1].find('.')
4
>>> f = "7.20"
>>> f[::-1].find('.')
2
Powerful Penguin