I have a YAML document with sequences like this
---
One:
- a
- b
- c
Two:
- d
- e
Three:
- f
- g
- h
- i
I need to get all possible combinations of the elements taken from each list one at a time, only one element at every instance from the list and all list must be used.
I need to do this is python.
Until now, I can print the YAML file using:
#!/usr/bin/env python
import yaml
with open("parameters.yaml", 'r') as stream:
try:
print(yaml.load(stream))
except yaml.YAMLError as exc:
print(exc)