Is there a simpler expression for the following, which would use itertools and not require defining a function?
itertools
It must support any iterable, including i