`chain(*iterable)` converts iterable into a tuple, concretizing it in memory. chain.from_iterable(iterable) is lazy and goes through the elements one a time, meaning iterable can be infinite.
"meaning iterable can be infinite" - thank you, I missed this part, but to be honest I don’t remember when I do something useful with infinite iterables.
Being fuzzy about "infinite" versus "very large" here are a couple examples:
>>> def first_ints():
... from random import randint
... while True:
... yield range(randint(10, 20))
...
>>> from itertools import chain
>>> nums = chain.from_iterable(first_ints())
>>> from itertools import islice
>>> list(islice(nums, 100, 150))
[3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 0, 1, 2, 3, 4, 5, 6]
In this code we want initial sequences of non-negative integers of varying lengths, repeated... because MATH. I could not concretize the infinite collection of finite sequences.
Here's an example that is just "very big" instead of infinite, but would still urge for .from_iterable().
I do not have infinitely many man pages on my system, but I have enough of them that I don't want to open file handles to all of them at once.