Source Code:
(back to article)
def greet(greeting, recipient): return f"{greeting}, {recipient}!" greetings = ['Hello', 'Hi', 'Hola'] recipients = ['world', 'Python', 'everyone'] for g, r in zip(greetings, recipients): print(greet(g, r))
Result:
Report an issue