Home / MCQ Bank / Computer
Computer Strings In Python

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

Select the best option to verify your answer:
Show Correct Answer
Correct Answer: Option B • Hello 'foo' and foo

Related Computer Questions

Which of these methods can be used to move to next element in a collection? What will be the output of the following C++ code? #include <iostream> #include <string> using namespace std; int main () { string str ("Steve jobs"); cout << str.capacity() << "\n"; return 0; } How many ways of passing a parameter are there in c++? What will be the output of the following C++ code? #include<iostream> using namespace std; int x[100]; int main() { cout << x[99] << endl; } ______ have the return type void.