Python-Quizzes | Python String Quiz | Question 1
Question 1: What is the output of the following program?
(A) c, b and a abracad0
(B) a, b and c abracadabra
(C) a, b and c abracadcad
(D) c, b and a abracadabra
Explanation: String function format takes a format string and an arbitrary set of positional and keyword arguments. For str1 ‘a’ has index 2, ‘b’ index 1 and ‘c’ index 0. str2 has only two indices 0 and 1. Index 0 is used twice at 1st and 3rd time.
Quiz of this Question
Please comment below if you find anything wrong in the above post