Original Post
The problem is that I expect the output to be:
0
0
instead it is:
0
1
Is there a solution to the following code?
[Edited by - macktruck6666 on July 14, 2010 10:34:48 PM]
0
0
instead it is:
0
1
Is there a solution to the following code?
class Menu: subMenuList = [] def addSubMenu(self, newSubMenu): print len(newSubMenu.subMenuList) self.subMenuList.append(newSubMenu) print len(newSubMenu.subMenuList)mainMenu = Menu()subMenu = Menu()mainMenu.addSubMenu(subMenu)[Edited by - macktruck6666 on July 14, 2010 10:34:48 PM]