iterator pattern the wheels of the bus go round and roundround and roundround and round data structures and algorithms form an integral part of the software design and development process oftendifferent data structures have different usesand using the right data structure for specific problem might mean lot less work and lot more efficiency choosing the correct data structure and matching it with the relevant algorithm will improve your solution since data structures have different implementationswe are tempted to implement the algorithms that operate on them differently for instanceif we were to consider binary tree that looks something like thisclass node(object)def __init__(selfdata)self data data self left none self right none traversing the elements of the tree to make sure you visit each one might look something like thisclass node(object)def __init__(selfdata)self data data self left none self right none def tree_traverse(node)if node left is not nonetree_traverse(node left(cwessel badenhorst badenhorstpractical python design patterns