Question Detail

COS 102 Python strings Objective Question

Question

Which of the following is a primary characteristic of using Python's triple quotes for string creation?
Options
A They only allow numeric data.
B They are exclusively for single-line strings.
C They enable the creation of multi-line strings.
Correct Answer
D They automatically add spaces between words.
Correct Answer

Option C is the correct answer.

Detailed Explanation

According to the 'Creating Strings' section, triple quotes like """Multi-line""" are used for multi-line strings.

Hint

Think about strings that need to span more than one line.

Question Info