Posted By

professorchaos on 04/03/09


Tagged

python


Versions (?)

Who likes this?

3 people have marked this snippet as a favorite

indamix
uselessdreamer
gartenstuhl


Simple Class


 / Published in: Python
 

  1. # Simple Python Class
  2.  
  3. class SimpleClass:
  4.  
  5. def __init__(self, string):
  6. print "In the constructor"
  7. print string
  8.  
  9. def SayHello(self, string):
  10. print "Hi, " + string + "."
  11.  
  12. simpleClass = SimpleClass("Value Recieved")
  13. simpleClass.SayHello("This is Python")

Report this snippet  

You need to login to post a comment.