Question Detail

COS 102 Python strings Objective Question

Question

What is the primary purpose of the '+' operator when used with strings in Python?
Options
A To add numerical values contained in strings
B To repeat a string multiple times
C To join two or more strings together
Correct Answer
D To compare two strings
Correct Answer

Option C is the correct answer.

Detailed Explanation

The document states that 'Concatenation is the process of joining two or more strings together to create a new one,' and 'In Python, we use the + operator.'

Hint

Think about the concept of 'Concatenation'.

Question Info