Question Detail
Question
Consider the following Python code:
What will be the value of
item = 'book'count = 3message = item * countWhat will be the value of
message?
Correct Answer
Option A is the correct answer.
Detailed Explanation
The
* operator performs string repetition. 'book' repeated 3 times results in 'bookbookbook'.
Hint
The repetition operator simply duplicates the string as many times as specified by the integer.