Python Programming - Variables - Discussion

Discussion Forum : Variables - General Questions (Q.No. 3)
3.
Which data type is assigned to a variable that contains a string?
byte
char
str
text
Answer: Option
Explanation:

In Python, the str data type is used to represent strings of text. Strings are immutable sequences of Unicode characters. They are denoted by single quotes ('), double quotes ("), or triple quotes (''' or """) and can contain any Unicode character.

Here are some examples of strings in Python:

'Hello, IndiaBIX!'

"This is a string."

'''This is a
multiline string.'''
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.