Python Language Linked List Node Write a simple Linked List Node in python

30% OFF - 9th Anniversary discount on Entity Framework Extensions until December 15 with code: ZZZANNIVERSARY9


A linked list is either:

  • the empty list, represented by None, or
  • a node that contains a cargo object and a reference to a linked list.
#! /usr/bin/env python

class Node: 
      def __init__(self, cargo=None, next=None): 
 = cargo 
          self.cdr = next    
      def __str__(self): 
          return str(

      def display(lst):
          if lst:
             w("%s " % lst)

Got any Python Language Question?