I've stumbled upon an interesting case - only thing I am sure about is that I will get an iterable
object.
What I really, and only, want to do is to count it.
I've searched if iterable in python implies countable and I found various places claiming so, except the official docs.
So 2 questions arise:
In Python, does iterable => countable (number of items)? Or is it just very common to be so?
Is there a generic pythonic way to get count from an iterable? Which seems to be answered here https://stackoverflow.com/a/3345807/1835470 i.e. not without counting, but author provided a pythonic one-liner:
sum(1 for _ in iterableObject)