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

User Chinthakad
by
5.9k points

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.

User Jels Boulangier
by
5.7k points