2
如果我運行下面的腳本:獲取ConfigObj引用字符串
from configobj import ConfigObj
config = ConfigObj()
config.filename = 'test.cfg'
config['keyword1'] = "the value"
config['keyword2'] = "'{0:s}'".format("the value")
config['keyword3'] = '"{0:s}"'.format("the value")
config.write()
輸出爲:
keyword1 = the value
keyword2 = "'the value'"
keyword3 = '"the value"'
有什麼辦法來產生下面的輸出?
keyword1 = 'the value'