1. 单引号:
切换到英文输入状态。
不按Shift键,直接按引号键(位于键盘的Enter键左侧)。
例如,输入`print('python')`。
2. 双引号:
同样切换到英文输入状态。
按住Shift键,然后按引号键(位于键盘的Enter键左侧)。
例如,输入`print("python")`。
需要注意的是,在Python字符串中,可以使用单引号包含双引号,或者使用双引号包含单引号,这样可以在字符串中包含引号本身,例如:
string1 = "This is a 'string' in double quotes."
string2 = 'This is a "string" in single quotes.'
希望这能帮助你正确输入Python中的单引号和双引号