asked 155k views
1 vote
What is the difference between ‘’ and “” string type in python?

1 Answer

3 votes

Answer:

There is no difference between ‘’ and “” string type in python. Both are used to hold the string or sequence of character in the python. triple """ """ can also use for the same.

Example:

str1 = "aeiou"

str2 = 'aeiou'

str3 =""" hello"""

print(type(str1), type(str2),type(str3))

<class 'str'> <class 'str'> <class 'str'>

Here all are used to hold string or sequence of character.

answered
User Jels Boulangier
by
7.7k points

No related questions found