[英]YAML-Print string a number of times
Is there an easy way in YAML
to print a string a number of times? YAML
中是否有一种简单的方法可以多次打印字符串?
for example in Python
例如在Python
print('String' * 500)
Can't get the syntax working in YAML
无法在YAML
中使用语法
YAML ("YAML Ain't Markup Language") is a human-readable data-serialization language. YAML(“YAML 不是标记语言”)是一种人类可读的数据序列化语言。 It is commonly used for configuration files and in applications where data is being stored or transmitted.它通常用于配置文件和存储或传输数据的应用程序。
Its not a programming language.它不是一种编程语言。 So that I think you can solve your problem with Python's yaml library.所以我认为您可以使用 Python 的 yaml 库解决您的问题。
https://stackabuse.com/reading-and-writing-yaml-to-a-file-in-python/ https://stackabuse.com/reading-and-writing-yaml-to-a-file-in-python/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.