The other methods are perfect for an individual if / else assemble. On the other hand, ternary statements inside list comprehensions are arguably tricky to go through.The outcomes show that In the event the iterable has just a few inner iterables then sum will be fastest, nevertheless for lengthy iterables only the itertools.Any scholar trying to i