如何使用python脚本写引号

问题描述 投票:0回答:2

我想知道如何使用''和脚本编写此python

因为我不知道如何使用python ''从脚本编写此代码>

这是我的代码:

from selenium import webdriver
import time
from random import *
import pyautogui as pg


time.sleep(2)
for i in range(1,510):
    pg.typewrite('')
    # here i want to type quotes in typewrite

这里我想在打字中输入引号

我想用我的script在记事本中写引号,但如果abc或123中的某些文字写成,则不是writing引号

谢谢!

[\n有什么特殊字符还是什么?

我想知道如何使用python使用脚本编写此'',因为我不知道如何使用python从脚本编写此''这是我的代码:from selenium import webdriver import time from ...

python python-3.x quotes double-quotes
2个回答
0
投票

您应该使用转义字符,大多数情况下为\

pg.typewrite('\'\'')

0
投票

您可以简单地使用双引号:

© www.soinside.com 2019 - 2024. All rights reserved.