Junior — Middle
What data type is used to store text sequences in programming?
sobes.tech AI
Answer from AI
To store text sequences in programming, the data type string is usually used. In Python, strings are sequences of characters enclosed in single, double, or triple quotes.
Example:
text = "Hello, world!"
print(text)
Strings in Python are immutable, meaning that after creation, individual characters cannot be changed, but new strings can be created based on existing ones.