How to take the first N items from a generator or list? [duplicate] May 8, 2022 by IT Nursery With linq I would var top5 = array.Take(5); How to do this with Python? 8 Answers 8