我需要空间转换为%20 API的帖子在Python阵列转换空间,以20%的列表
tree = et.parse(os.environ['SPRINT_XML'])
olp = tree.findall(".//string")
if not olp:
print colored('FAILED', 'red') +" No jobs accociated to this view"
exit(1)
joblist = [t.text for t in olp]
我如何能做到以上t.text?
对我来说似乎是一个双重问题。你知道如何转换单个元素吗? –
https://docs.python.org/2/library/urllib.html#urllib.quote –
其他字符呢,它们不应该被URL编码吗? –