什么是字符串?
在Python中,使用单引号或者双引号括起来的,就是字符串
字符串也可以使用六个单引号或者六个双引号括起来
注意:所有包含中文或英文内容均为字符串类型
字符串 单引号
user_name = 'Micheal'
字符串 双引号
text = "你好世界"
字符串 6个单引号
content = ''' hello python '''
字符串 6个双引号
content = """ hello python """
在Python中,使用单引号或者双引号括起来的,就是字符串
字符串也可以使用六个单引号或者六个双引号括起来
注意:所有包含中文或英文内容均为字符串类型
字符串 单引号
user_name = 'Micheal'
字符串 双引号
text = "你好世界"
字符串 6个单引号
content = ''' hello python '''
字符串 6个双引号
content = """ hello python """