n=12345.67

小数点以下が何桁あるのか調べたいのですが
len(str(n).split(".")[1]) if isinstance(n, float) else 0
こんなんでいいですかね・・?