How to iterate over the first n elements of a list? February 13, 2023 by Tarik The normal way would be slicing: for item in your_list[:n]: ...