tuple改list

assert mmcv.is_list_of(workflow, tuple)
dump(tuple)到json后,tuple变为list
可以用workflow=[tuple(i) for i in workflow(i)],将[[“a”,1]]改为[(“a”,1)]

你可能感兴趣的:(tuple改list)