python 2.7 - Whats means the : operator in str.format()? -


take {:.2f}.format(x) example. gives me output fixed-point number precision 2 output. : means? have question: why upper function doesn't work when give input x = 7.5643915285818e+210+4.6951592215e+280j?

colon (:) used instead of % in formatting.

refer link


Comments

Popular posts from this blog

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.Error occurred in starting fork -

windows - Debug iNetMgr.exe unhandle exception System.Management.Automation.CmdletInvocationException -

configurationsection - activeMq-5.13.3 setup configurations for wildfly 10.0.0 -