【发布时间】:2015-07-28 19:55:08
【问题描述】:
Python 2 的一个非常简单的问题:
我正在调用带有只读标志的特定库/函数传递文件名:
myfunction(r'/tmp/file.txt')
我想用变量替换它:
filename = '/tmp/file.txt'
myfunction(r????)
如何调用该函数?
【问题讨论】:
-
有什么理由不能这样做?
标签: python variables readfile python-2.x