Question Detail
Question
What will be the output of the following Python code?
text = "Python! "print(text * 2)
Correct Answer
Option B is the correct answer.
Detailed Explanation
The string 'Python! ' includes a trailing space. When repeated twice using the
* operator, this space is also repeated, resulting in 'Python! Python! '.
Hint
Pay close attention to all characters in the string, including any leading or trailing spaces, as they will be repeated.