Home
Sign Up
Sign In
V2EX
›
问与答
请问在 python3 中如何将 string 类型转换为 decimal.Decimal 类型?
panghua
·
Aug 21, 2018
· 4816 views
This topic created in 2997 days ago, the information mentioned may be changed or developed.
在 python3 中如何将 string 类型转换为 decimal.Decimal 类型
DECIMAL
string
Python3
类型
3 replies
•
2018-11-12 17:31:05 +08:00
edsion996
Aug 21, 2018
1
https://docs.python.org/3/library/decimal.html
panghua
OP
Aug 22, 2018
2
谢谢!
tqknight
Nov 12, 2018
3
import decimal
dec = decimal.Decimal('0.123456')
About
·
Help
·
Advertise
·
Blog
·
API
·
FAQ
·
Privacy
·
Solana
·
1671 Online
Highest 6679
·
Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 31ms ·
UTC 23:53
·
PVG 07:53
·
LAX 15:53
·
JFK 18:53
♥ Do have faith in what you're doing.
❯