Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
0.1245-102 フォーマットが予期されていないため、この float 変換が機能しないように見える Fortran フォーマットの数値文字列があります。0.1245e-102
0.1245-102
0.1245e-102
このコマンドを使用します
re.sub(r"[0-9]-[0-9]",r"e-","0.1245-102")
私は正規表現に非常に慣れていないので、この方法で新しい結果0.124e-02 を保持するにはどうすればよいですか?5e-1
0.124e-02
5e-1