(no subject)

Shaun Hogan shogan at iel.ie
Wed Mar 8 07:08:54 EST 2000


id like to create a database within the python script, which contains names
and corresponding numbers. then i want to be able to call a function that
will output the whole list, and also id like to be able to call a
name/number and get the corresponding name/number.
can anyone tell me how to do this?
Thanks
Shaun

class Subscriber:
    #how would i insert a databas in here.
    #it would contain names and corresponding numbers
    #the main purpose being to call a list of all names and numbers in the
data base
    #or to call a name/number and get the corresponding name/number?
    def __init__(self,name,number):
        self.name=name
        self.number=number
    def getname(self):
        return self.name
    def getnumber(self):
        return self.number









More information about the Python-list mailing list