tmi12 tmi12 - 1 year ago 101
Python Question

Python 2.7.10 class object list

Is it possibly to make 'self.elo' object a list (or maybe vector?), which has every single data point on it.

class Joukkue:
def __init__(self, name, games, elo): = name = games
self.elo = elo

I'm currently just changing the values into new ones, but I would like to see the development of teams rating(elo) and maybe visualize it aswell. This is how I do this currently:

lista = {}
lista[ID1].elo = a
lista[ID2].elo = b

This is just part of my code and I can post the whole .py file if needed.

Answer Source

If I understood your question correctly you want to make self.elo a list. I believe this is possible this way:

self.elo = [items, in, here]
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download