What's the shortest way to count the number of items in a generator/iterator?,sum(1 for i in it)