Truncate to three decimals in Python January 23, 2023 by Tarik You can use an additional float() around it if you want to preserve it as a float. val="%.3f"%(1324343032.324325235)