在 python3 中使用单引号和双引号时出错
Error while using single and double qoutes in python3
我在使用 os.system() 函数时在 python 中遇到 EOL 错误。
以下是生成错误的代码行:
os.system("cat subdomains.txt | cut -d'"' -f1 ")
基本上我正在尝试使用分隔符 ["](双引号)修改输出字符串
如果需要在 "
引号内写 "
,可以写成 \"
"cat subdomains.txt | cut -d'\"' -f1 "
我在使用 os.system() 函数时在 python 中遇到 EOL 错误。 以下是生成错误的代码行:
os.system("cat subdomains.txt | cut -d'"' -f1 ")
基本上我正在尝试使用分隔符 ["](双引号)修改输出字符串
如果需要在 "
引号内写 "
,可以写成 \"
"cat subdomains.txt | cut -d'\"' -f1 "