What is the difference between following assignments:

>>> a = 'h'  
>>> a
'h'  
>>> b = "h"
>>> b  
'h'
>>> c = '''h'''
>>> c  
'h'
有帮助吗?

解决方案

There is no difference.

The only difference between ' and " is that you can use one inside the other. E.g.

x = "Hey that's my bike!"
y = 'I responded, "Yes, it is."'

Strings enclosed in ''' and """ can contain both ' or " and can span multiple lines.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top