Object-Oriented Programming · Airbnb · Medium
Write a Python iterator that walks over a two-dimensional list of integers. The outer list is visited in order from the first row to the last, and within each row the integers are visited from left to right. Rows that are empty contribute nothing and are passed over. The three methods must behave as follows: hasNext() reports True when at least one more integer lies beyond the current cursor, and False otherwise. Calling it any number of times in a row is allowed, and doing…