Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
~541 People Reached
Favorite Forums
Favorite Tags
Member Avatar for Anton_6

I have the following code: lista_cosas=[] class cosa(): global lista_cosas def __init__(self,color): self.color=color def operacion(self): if self.color=="verde": lista_cosas.append(cosa("azul")) else: lista_cosas.append(cosa("verde")) c=cosa("verde") lista_cosas.append(c) n=0 while n<10: n+=1 for cosa in lista_cosas: cosa.operacion() and it gives me the following error: Traceback (most recent call last): File "C:/Users/elster/Desktop/Cancer modelling with python/recursive_test.py", line 21, …

Member Avatar for chriswelborn
0
541