如何在yaml文件中使用另一个键的值

时间:2021-01-07 09:45:03

标签: python yaml

我需要使用同一个 yaml 文件的另一个密钥在 yaml 文件中写入一个 URL 密钥。

A:本地

网址:https://login.{A}.domain.com/

当我在我的 python 脚本中读取文件时,我应该得到

对于 A -- 本地

对于网址 -- https://login.local.domain.com/

我怎样才能得到上面的输出。感谢您提前提供帮助。

0 个答案:

没有答案
相关问题