I would like to inquire if there is an elegant pythonic way of executing some function on the first loop iteration. The only possibility I can think of is:
f
This works:
for number, member in enumerate(something.get()):
if not number:
root.copy(member)
else:
somewhereElse.copy(member)
foo(member)
In most cases, though, I'd suggest just iterating over whatever[1:]
and doing the root thing outside the loop; that's usually more readable. Depends on your use case, of course.