The basis for this code is the code from the previous exercise. For readability, I removed all the methods that I no longer needed for the demonstration (which is almost everything), but you could let all of them remain if you wish, and simply add the __iter__()
method and the delegated object.
Note: The submission of this exercise is in markdown and therefore won’t be tested. Use your preferred code editor or Papyrus1 to test your code.