RosettaCodeData/Task/Repeat/Python/repeat-1.py

10 lines
196 B
Python
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
#!/usr/bin/python
def repeat(f,n):
for i in range(n):
f();
def procedure():
print("Example");
repeat(procedure,3); #prints "Example" (without quotes) three times, separated by newlines.