任何人都可以解釋爲什麼我無法做到這一點,如果有任何workaroud?無法寫入函數返回到文件
這適用於前。
a, b, c, d = extract(text)
fw.write("Number of SMS: {0} \nCharacters before extraction: {1} \nCharacter after extraction: {2} \nOverhead: {3:.0f}%".format(a, b, c, d))
但這並不
fw.write("Number of SMS: {0} \nCharacters before extraction: {1} \nCharacter after extraction: {2} \nOverhead: {3:.0f}%".format(extract(text)))
什麼是'extract'功能? – hjpotter92
把'。.format(extract(text)))'改成'... .format(* extract(text)))' – alfasin