I have the following code
name = "testyaml"
version = "2.5"
os = "Linux"
sources = [
{
'source': 'news',
'target': 'industry'
},
{
'source': 'testing',
'target': 'computer'
}
]
And I want to make this yaml with python3
services:
name: name,
version: version,
operating_system: os,
sources:
-
source: news
target: industry
-
source: testing
target: computer
I need a help specially on Sources part that how I can add my dictionary list there