Python 字符串字面量

字符串字面量

在 Python 中,字符串字面量由单引号或双引号包围。

'hello' 等同于 "hello"。

您可以使用 print() 函数显示字符串字面量:

实例

print("Hello")
print('Hello')

亲自试一试