It is very convenient to use a method called itertools.product to get a list of combinations of the contents of multiple lists.
Input = ["Docment","StyleSheet","Value"]
Output = ["XML","Shema","DTD"]
Action = ["Read","Write","GetRoot","EditSubELM","EditDescELM","Append","Insert","Iterate","Find","Format"]
writeObj = list(itertools.product(Input,Output,Action))
with open("write.txt","w") as writer:
writer.write(str(writeObj))
writer.close()
The output result is as follows.
('Docment', 'XML', 'Read')
('Docment', 'XML', 'Write')
('Docment', 'XML', 'GetRoot')
('Docment', 'XML', 'EditSubELM')
('Docment', 'XML', 'EditDescELM')
('Docment', 'XML', 'Append')
('Docment', 'XML', 'Insert')
('Docment', 'XML', 'Iterate')
('Docment', 'XML', 'Find')
('Docment', 'XML', 'Format')
('Docment', 'Shema', 'Read')
('Docment', 'Shema', 'Write')
('Docment', 'Shema', 'GetRoot')
('Docment', 'Shema', 'EditSubELM')
('Docment', 'Shema', 'EditDescELM')
('Docment', 'Shema', 'Append')
('Docment', 'Shema', 'Insert')
('Docment', 'Shema', 'Iterate')
('Docment', 'Shema', 'Find')
('Docment', 'Shema', 'Format')
('Docment', 'DTD', 'Read')
('Docment', 'DTD', 'Write')
('Docment', 'DTD', 'GetRoot')
('Docment', 'DTD', 'EditSubELM')
('Docment', 'DTD', 'EditDescELM')
('Docment', 'DTD', 'Append')
('Docment', 'DTD', 'Insert')
('Docment', 'DTD', 'Iterate')
('Docment', 'DTD', 'Find')
('Docment', 'DTD', 'Format')
('StyleSheet', 'XML', 'Read')
('StyleSheet', 'XML', 'Write')
('StyleSheet', 'XML', 'GetRoot')
('StyleSheet', 'XML', 'EditSubELM')
('StyleSheet', 'XML', 'EditDescELM')
('StyleSheet', 'XML', 'Append')
('StyleSheet', 'XML', 'Insert')
('StyleSheet', 'XML', 'Iterate')
('StyleSheet', 'XML', 'Find')
('StyleSheet', 'XML', 'Format')
('StyleSheet', 'Shema', 'Read')
('StyleSheet', 'Shema', 'Write')
('StyleSheet', 'Shema', 'GetRoot')
('StyleSheet', 'Shema', 'EditSubELM')
('StyleSheet', 'Shema', 'EditDescELM')
('StyleSheet', 'Shema', 'Append')
('StyleSheet', 'Shema', 'Insert')
('StyleSheet', 'Shema', 'Iterate')
('StyleSheet', 'Shema', 'Find')
('StyleSheet', 'Shema', 'Format')
('StyleSheet', 'DTD', 'Read')
('StyleSheet', 'DTD', 'Write')
('StyleSheet', 'DTD', 'GetRoot')
('StyleSheet', 'DTD', 'EditSubELM')
('StyleSheet', 'DTD', 'EditDescELM')
('StyleSheet', 'DTD', 'Append')
('StyleSheet', 'DTD', 'Insert')
('StyleSheet', 'DTD', 'Iterate')
('StyleSheet', 'DTD', 'Find')
('StyleSheet', 'DTD', 'Format')
('Value', 'XML', 'Read')
('Value', 'XML', 'Write')
('Value', 'XML', 'GetRoot')
('Value', 'XML', 'EditSubELM')
('Value', 'XML', 'EditDescELM')
('Value', 'XML', 'Append')
('Value', 'XML', 'Insert')
('Value', 'XML', 'Iterate')
('Value', 'XML', 'Find')
('Value', 'XML', 'Format')
('Value', 'Shema', 'Read')
('Value', 'Shema', 'Write')
('Value', 'Shema', 'GetRoot')
('Value', 'Shema', 'EditSubELM')
('Value', 'Shema', 'EditDescELM')
('Value', 'Shema', 'Append')
('Value', 'Shema', 'Insert')
('Value', 'Shema', 'Iterate')
('Value', 'Shema', 'Find')
('Value', 'Shema', 'Format')
('Value', 'DTD', 'Read')
('Value', 'DTD', 'Write')
('Value', 'DTD', 'GetRoot')
('Value', 'DTD', 'EditSubELM')
('Value', 'DTD', 'EditDescELM')
('Value', 'DTD', 'Append')
('Value', 'DTD', 'Insert')
('Value', 'DTD', 'Iterate')
('Value', 'DTD', 'Find')
('Value', 'DTD', 'Format')
Recommended Posts