我想替换这个: path = r'C:/文件夹 有了这个: path = r'变量
变量在别处定义。
不确定如何将变量名放在 r' 之后
请您参考如下方法:
这应该有效:
path = r'%s' % variable