我得到这样的列表输出,我想明确区分列表,以便我可以分别访问每个列表我该怎么做
for Book in rootNode.getBooks():
CompareTables=[]
CompareTables.append(Book.getName())
for Table in Book.getTables():
CompareTables.append(Table.getName())
print CompareTables
Output:
['Document', 'A','B','C']
['Document', 'A','B','C','D','E','F']
我想要这样的输出:
print CompareTables1
Output:
['Document', 'A','B','C']
print CompareTables2
['Document', 'A','B','C','D','E','F']