我有以下代码:
new_file.write(("""
<cleared_for_hd_vod>%(enable_est_hd)s</cleared_for_hd_vod>
<cleared_for_hd_sale>%(enable_vod_hd)s</cleared_for_hd_sale>"""
% update_data).lower())
这给了我以下信息:
^{pr2}$但是,我需要的是:
<cleared_for_hd_vod>true</cleared_for_hd_vod>
<cleared_for_hd_sale>false</cleared_for_hd_sale>
有没有办法通过改变我当前使用的字符串格式(在这个问题的顶部)来实现这一点?在
相关问题 更多 >
编程相关推荐