This is what I intended to do
class person:
"class to represent a person"
def _init_(self):
self.name = ""
self.age = 0.0
self.sqr_age = 0
class ageName:
def listAgeName(x,y):
# x is name
# y is age
x = 0
y = 0
listAgeName = [('John', 18)]
p = person()
g = ageName()
p.age = ageName(y)
p.name = ageName(x)
I want to make a new class. So when I have a group of list
list1 = [('X',y), ('X2',y2)]
I can assign each x to p.age and each y to p.name,..
What did I do wrong here?
Thanks