HF RL Explorer

Write a Python function called consume(iterator, n) that advances a given iterator by n steps in-place…

Write a Python function called consume(iterator, n) that advances a given iterator by n steps in-place…: a task in repo2rlenv-r2e (Harbor dataset). Behavior requirements: - If n is a non-negative integer, advance the iterator exactly n steps (or until exhausted if fewer than n elements remain). -…

Part of FineEnvs/repo2rlenv-r2e.