Question Detail

COS 102 Python strings Objective Question

Question

How can you create multiple copies of a string and join them together in Python?
Options
A Using the '+' operator
B Using the '*' operator followed by an integer
Correct Answer
C Using the '/' operator
D Using the 'len()' function
Correct Answer

Option B is the correct answer.

Detailed Explanation

The document explains that 'Repetition creates multiple copies of a string and joins them together. We use the * operator followed by an integer.'

Hint

Look for the section titled 'Repetition'.

Question Info