Not my code but I think free to share.
This is intended as beginning point of learning classes or learning data structures.
Read the document
As first exercise, this does not work instead of the while loop in test part:
for i in numbers: print i Traceback (most recent call last):
File "D:\Python Projects\Tests\", line 39, in <module>
for i in numbers: print i
TypeError: iteration over non-sequence
Do you find a way to make it work?