Python-Quizzes | Python String Quiz | Question 2

Last Updated :
Discuss
Comments

What is the output of the following program?

Python
a = 2
b = '3.77'
c = -8
s = '{0:.4f} {0:3d} {2} {1}'.format(a, b, c) 
print(s) 

2.0000 2 -8 3.77

2 3.77 -8 3.77

2.000 3 -8 3.77

2.000 2 8 3.77

Share your thoughts in the comments