您可以使用
str.rstrip
def trailing(s): return len(s) - len(s.rstrip('0'))
上一篇 numpy:“ array_like”对象的正式定义?
下一篇 ImportError:没有名为“版本”的模块
版权所有 (c)2021-2022 MSHXW.COM
ICP备案号:晋ICP备2021003244-6号