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
c) Hello foo and ‘bin’
d) Error
Answer: b
Explanation: !r causes the characters ‘ or ” to be printed as well.
Related Posts
RBAC is abbreviated as ______________
DTE is abbreviated as ___________________
_______________ in a system is given so that users can use dedicated parts of the system for which they’ve been given access to.
MAC is abbreviated as _______________
In a Linux-based system, the accounts may be members of 1 or more than one group.
In your Linux-based system, you have to log-in with your root account for managing any feature of your system.
Using the ______ account of a UNIX system, one can carry out administrative functions.
Join The Discussion