Categories Uncategorized Very Simple Class – Python Post author By josechristian Post date September 25, 2012 No Comments on Very Simple Class – Python #!/usr/bin/python # simpClass.py class calc: def __init__(self,a,b): self.add=a+b self.sub=a-b fCalc=calc(2,2) sCalc=calc(3,6) print fCalc.add print sCalc.sub that returns $ python simpClass.py 4 -3 Share this:TwitterFacebookLike this:Like Loading... Related Tags programming, python ← Create List of Thread ID Numbers – Python → From nCol to Pajek 1/2 – Python Leave a Reply Cancel reply Enter your comment here... Please log in using one of these methods to post your comment: Email (Address never made public) Name Website You are commenting using your WordPress.com account. ( Log Out / Change ) You are commenting using your Twitter account. ( Log Out / Change ) You are commenting using your Facebook account. ( Log Out / Change ) Cancel Connecting to %s Notify me of new comments via email. Notify me of new posts via email. Δ