bio data format resume get data back usb data cable drivers data recovery corel word perfect merge data the ring circular flow chart template
Description - Implementing a circular data structure using lists
In some applications, it`s advantageous to be able to define a circular data structure (a structure in which the last element is a pointer to the first). Python lists make it easy to make such a beast. A list is an ordered sequence of elements, so implementing a "ring" as a Python list is easy. "Turning" the ring consists of removing the last element from the list and placing it in the list`s beginning slot. We can encapsulate this behavior in a class, which is shown below as the "Ring" class.