Python中字符串默认的单引号如何转换为双引号
其他问答
1
Python新人,在做一个小软件,用到了pdfminer这个包,我在Python文件中用到os.system()函数:
os.system('pdf2txt.py -o "E:\PDF\output.txt" "E:\PDF\A Functional Genetic Approach Identifies the PI3K Pathway as a Major Determinant of Trastuzumab Resistance in Breast Cancer.pdf"')
"E:\PDF\A Functional Genetic Approach Identifies the PI3K Pathway as a Major Determinant of Trastuzumab Resistance in Breast Cancer.pdf"这个路径要用双引号表示,现在我想定义一个变量strSource,令strSource ="E:\PDF\A Functional Genetic Approach Identifies the PI3K Pathway as a Major Determinant of Trastuzumab Resistance in Breast Cancer.pdf",再代入os.system()中,结果strSource中的字符串的引号变成单引号了,导致无法生成output.txt,不知道谁知道怎样把Python中字符串默认的单引号转换为双引号。
发表回复