小编Mic*_*vis的帖子

字符串文字中的正斜杠行为异常

为什么 S1 和 S2 在撇号位置方面表现不同?

S1="1/282/03/10"
S2="4/107/03/10"
R1="".join({"N\'" ,S1,"\'" })
R2="".join({"N\'" ,S2,"\'" })
Run Code Online (Sandbox Code Playgroud)

输出:

"N''1/282/03/10"    //R1 
"N'4/107/03/10'"    //R2
Run Code Online (Sandbox Code Playgroud)

python string python-3.x

2
推荐指数
1
解决办法
47
查看次数

标签 统计

python ×1

python-3.x ×1

string ×1