标签:get pre color res deepcopy end field final log
newFields = []
for i in range(len(self.fields["testResult"])):
newFields.append(self.fields["testResult"][i]["log"][:-1])
finalFields = []
for num in range(len(newFields)):
if num == 0:
finalFields.append(newFields[num])
else:
length = len(newFields[num]) - len(newFields[num - 1])
d = copy.deepcopy(newFields[num])
new = []
for m in range(length):
get = d.pop()
new.insert(0, get)
finalFields.append(new)
for number in range(len(finalFields)):
self.fields["testResult"][number]["log"] = finalFields[number] + [""]
标签:get pre color res deepcopy end field final log
原文地址:https://www.cnblogs.com/yanpan/p/11402688.html