From your information it is very difficult to understand what you want from your code. I think you have written wrong code and that's why you are getting such type of problem. In this case you have to write following code to fix this problem.
Code:
data = {
(1, 'users1'): ("names1", "coords1", "heros1"),
(2, 'users1'): ("names2", "coords2", "heros2"),
#...
(1, 'users2'): ("names11", "coords11", "heros11"),
(2, 'users2'): ("names12", "coords12", "heros12"),
# ...
}
class CityBean:
def __init__(self,names,coordss,heros):
self.names = names
self.coordss = coordss
self.heros = heros
class Castles:
def __init__(self,users,n):
self.users = users
self.n = n
names, coordss, heros = data.get((n, users))
self.citybean = CityBean(names, coordss, heros)
Bookmarks