Question Detail

COS 102 Python strings Objective Question

Question

According to the document, what is the fundamental definition of a string in Python?
Options
A A collection of numerical digits.
B An immutable list of characters.
C A sequence of characters wrapped in quotes.
Correct Answer
D A data type used exclusively for text files.
Correct Answer

Option C is the correct answer.

Detailed Explanation

Page 3, 'What are Strings?', defines a string as 'simply a sequence of characters wrapped in quotes.' While strings are immutable and can contain numerical digits, the most fundamental definition given is its character sequence and the use of quotes.

Hint

Refer to the section titled 'What are Strings?' for the basic definition.

Question Info