I need to make a yaml file with a dict and a specific format.
The desired format of the yaml file would be:
classification:
- type: 4
probability: 1.0
So far I created a dict with the following:
dic = {
'classification': {
'type': 4,
'probability': 1.0
}
which creates the following yaml file:
classification:
type: 4
probability: 1.0
What do I need to do to get the -
in front of type
?