How can I create a linked list in Python?

Dongsheng Ruan rds1226 at sh163.net
Tue Jan 16 13:51:30 EST 2007


with a cell class like this:

#!/usr/bin/python

import sys

class Cell:

 def __init__( self, data, next=None ):
  self.data = data
  self.next = next

 def __str__( self ):
  return str( self.data )

 def echo( self ):
  print self.__str__() 





More information about the Python-list mailing list