Examveda

What will be the output of the following Python code snippet?
x=3.3456789
'%-6.2f | %05.2f | %+06.1f' %(x, x, x)

A. '3.35 | 03.35 | +003.3'

B. '3.3456789 | 03.3456789 | +03.3456789'

C. Error

D. '3.34 | 03.34 | 03.34+'

Answer: Option A


This Question Belongs to Python Program >> Formatting And Decorators

Join The Discussion

Related Questions on Formatting and Decorators