Lets you separate algorithms from the objects on which they operate.
You have a graph of shapes. You write an 'XMLExportVisitor' that walks the graph and generates XML, without modifying the shape classes.
class Visitor:\n def __init__(self):\n pass\n\n def execute(self):\n print('Executing Visitor')