How do I created a class with a printing function?
<p>I want to create a separate file class that will be a print function. So I want it to print out a list when it gets the parameter. So lets call the class <code>print_list</code> and let's take the start variable I want the function to go through the list and print out the data. How do I create this function?</p>

<pre><code>   from print_list import *

   class node:
   pass 

   start = node
   point = start

    point.data= 1
    print (point.data )
    point.next = node ()
    point = point.next

    point.data= 2
    print (point.data )
    point.next = node ()
    point = point.next 

     point.data= 3
     print (point.data )
      point.next = node ()
     point = point.next

    point.data= 4
  print (point.data )
   point.next = None
  point = point.next
</code></pre>

<p>Why not try the build in <code>print</code> function of python? Something like</p>

<pre><code>print(x)
</code></pre>

<p>or, if x is an iterable like a list, you could also do</p>

<pre><code>print(*x)
</code></pre>

python