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

iis - ASP.Net Core CreatedAtAction in HttpPost action returns 201 but entire request ends with 500 -

gcc - Neither ld wrap nor LD_PRELOAD working to intercept system call -

ssh - Vagrant Windows - ssh_exchange_identification: read: Connection reset by peer -