Repetir coisas manualmente?! Negativo. Crie "macros" com total simplicidade!
import macroma
class Base(macroma.Environment):
@macroma.function(name="Print")
def my_print_function(self, value):
print(value)
app = macroma.MacroMa()
app.load_environment(Base)
script = """
:(Base;)
Macroma (
Print "Hello, world!";
Print Hello my friend!;
)
"""
app.load_script(script, "example")
app.run_script("example")
...
...
Make goals.