Register Now

Login

Lost Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

What will be the output of the following Python code?
print(“Hello {} and {}”.format(‘foo’, ‘bin’))

What will be the output of the following Python code?
print(“Hello {} and {}”.format(‘foo’, ‘bin’))
a) Hello foo and bin
b) Hello {} and {}
c) Error
d) Hello and

Answer: a
Explanation: It is the same as Hello {0} and {1}.

Join The Discussion