What will be the output of the following Python code?
print(“Hello {1} and {0}”.format(‘bin’, ‘foo’))
a) Hello foo and bin
b) Hello bin and foo
c) Error
d) None of the mentioned
Answer: a
Explanation: The numbers 0 and 1 represent the position at which the strings are present.
Related Posts
The ________ function can be used to create vectors of objects by concatenating things together.
What will be the output of the following R code?
> x <- vector(“numeric”, length = 10)
> xWhich of the following can be considered as object attribute?
R objects can have attributes, which are like ________ for the object.
Attributes of an object (if any) can be accessed using the ______ function.
Point out the correct statement?
If you explicitly want an integer, you need to specify the _____ suffix.
Join The Discussion