Question Detail

COS 102 lecture 4 Objective Question

Question

When would you typically use triple quotes in Python?
Options
A To indicate an integer literal.
B When your string literal runs across several lines.
Correct Answer
C To define a Boolean value.
D To signify a comment in the code.
Correct Answer

Option B is the correct answer.

Detailed Explanation

Page 20 notes: 'You would use the triple quotes when your string runs across several lines.'

Hint

The section 'Using Quotations' on page 20 discusses different types of quotes.

Question Info