Question Detail

COS 102 Python strings Objective Question

Question

Which Python operator is used to join two or more strings together to create a new one, as described in the 'Concatenation' section?
Options
A <code>*</code> (asterisk)
B <code>+</code> (plus sign)
Correct Answer
C <code>/</code> (forward slash)
D <code>%</code> (modulo)
Correct Answer

Option B is the correct answer.

Detailed Explanation

The 'Concatenation' section (page 5) states: 'In Python, we use the + operator.'

Hint

Think about how you 'add' two pieces of text together.

Question Info