我有一堆用科学计数法表示的数字,我想找到它们的指数。例如:
>>> find_exp(3.7e-13) 13 >>> find_exp(-7.2e-11) 11
因此,我只需要他们的指数,忽略其他一切,包括符号。
我在 python 中寻找过这种方法,但类似的问题仅用于格式化目的。
python scientific-notation
python ×1
scientific-notation ×1