How to iterate over the first n elements of a list?

后端 未结 4 566
悲哀的现实
悲哀的现实 2020-12-08 06:09

Say I\'ve got a list and I want to iterate over the first n of them. What\'s the best way to write this in Python?

4条回答
提交回复
热议问题