#!/usr/bin/env python #codeing utf-8 class Helloword: count = 100; def __init__(self,count): self.count=count; def add(self,a): return self.count+a; h=Helloword(1000); a=h.add(1); print a;
spython.py
#!/usr/bin/env python #codeing utf-8 import Helloword h=Helloword.Helloword(1000); a=h.add(1); print a;