KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Is there a way to round a python float to x decimals? For example: >>> x = roundfloat(66.66666666666, 4) 66.6667 >>> x = roundfloat(1.29578293, 6) 1.295783 I've found ways to trim/truncate them (66.666666666 --> 66.6666), but not round (66.666666666 --> 66.6667).
Tags (comma-separated)
Save Edits
Cancel