2 ms·
It doesn't change the fact that it's a function that mutates its parameter, even if it eventually calls a method to do so. And, furthermore, it is idiomatic to
by int_19h 1y ago
It doesn't change the fact that it's a function that mutates its parameter, even if it eventually calls a method to do so. And, furthermore, it is idiomatic to call next(iter) rather than iter.__next__(), even when no default value is expected.