class Bag:
        def __init__(self):
                self.data = []
        def add(self, x):
                self.data.append(x)
        def howmuch(self):
                return self.data
import Bag
x = Bag.Bag()
Bag.Bag.Howmuch(x)
x.Howmuch()
from Bag import *
x = Bag()
Bad.Howmuch(x)
x.Howmuch()

Feedback

Powered by Vanilla PHP feedback form