How many decimal places
Problem to find the How many number after the decimal.
Example-1:
Input : n = "3.1415" Output : 4
Example-2:
Input : n = "3.200" Output : 3
Example-3:
Input : n = "300" Output : 0
Solution
a = 3.1415 b = str(a)[::-1] if "." in b: c = b.index('.') print(c) else: print('0')
Output
4