list comprehension for text output

master
km0 3 years ago
parent fd3207f881
commit 4d65c42884

@ -87,7 +87,7 @@ def update_wiki(recipe):
text = page.text() text = page.text()
steps = [f"# {log}" for log in recipe["logs"]].join('\n') steps = '\n'.join([f"# {log}" for log in recipe["logs"]])
# PROV TEMPLATE # PROV TEMPLATE
content = f""" content = f"""
@ -107,7 +107,7 @@ def update_wiki(recipe):
""" """
# mi disp # mi disp
text += [line.strip() for line in content.splitlines()].join('\n') text += '\n'.join([line.strip() for line in content.splitlines()])
print(text) print(text)

Loading…
Cancel
Save