Object-Oriented Programming · C3.ai · Medium
You are handed two lists. Build an iterator over them that yields their elements in alternating order: first an element from one list, then an element from the other, and so on, switching lists on every step. When the shorter list runs out of elements, the iterator should continue by yielding whatever elements remain in the longer list, in their original order, until both lists are fully consumed.