SyntaxFix
Write A Post
Hire A Developer
Questions
since function is first-class citizen, you can write small wrapper (from Alex answers)
def repeat(f, N): for _ in itertools.repeat(None, N): f()
then you can pass function as argument.