【发布时间】:2021-11-30 07:36:09
【问题描述】:
我有以下代码
name = "testyaml"
version = "2.5"
os = "Linux"
sources = [
{
'source': 'news',
'target': 'industry'
},
{
'source': 'testing',
'target': 'computer'
}
]
我想用 python3 制作这个 yaml
services:
name: name,
version: version,
operating_system: os,
sources:
-
source: news
target: industry
-
source: testing
target: computer
我需要一个关于 Sources 部分的帮助,我可以在那里添加我的字典列表
【问题讨论】:
-
除了
sources,你还发现了什么?到目前为止,您能向我们展示您的代码吗?