Python2.7を使用してxmlファイルに期間属性を追加したいと思います。
import xml.etree.ElementTree as ET
import time
for k in root.findall('TC'):
ttt= k.get('time')
s = time.strptime(ttt, "%H:%M:%S")
total_time = total_time + s
演算子を使用できません。+
エラーはunsupported operand types (+) None_Type, time.struct_time
です。
どうすればとして定義できますtotal_time
かstruct_time
?