Vidyalelo
Python · Q135

MCQs for Python Strings: Exam

Programming · Python · question 135

Q135

What will be the output of the following Python code? print("Hello 0!r and 0!s".format('foo', 'bin'))

A.
Hello foo and foo
B.
Hello 'foo' and foo
Answer
C.
Hello foo and 'bin'
D.
Error

Answer: Option B

Solution

Answer: Option B
No explanation is given for this question Let's Discuss on Board