What Will Be The Output Of The Python Code Shown Below For #108
What will be the output of the python code shown below for various styles of format specifiers?</p> <pre><code class="language-python">x=1234 res='integers:...%d...%-6d...%06d' %(x, x, x) res</code></pre>
This multiple choice question (MCQ) is related to the book/course
gs gs109 Python.
It can also be found in
gs gs109 Formatting & Decorators in Python - Python Formatting - Quiz No.2.
What will be the output of the python code shown below for various styles of format specifiers?
x=1234 res='integers:...%d...%-6d...%06d' %(x, x, x) res
‘integers:…1234…1234 …001234’
‘integers…1234…1234…123400’
‘integers:… 1234…1234…001234’
‘integers:…1234…1234…001234’