Files

22 lines
354 B
Python

def run_once(f):
already_run = False
def wrapper(*args, **kwargs):
nonlocal already_run
if not already_run:
already_run = True
f(*args, **kwargs)
pass
return wrapper
@run_once
def begruessung(name):
print(f"Hallo {name}!")
begruessung("Sophia")
begruessung("Max")
begruessung("Lisa")