class Player:
def __init__(self, x, y, z, t, f, g):
#code
def function1(self):
#code
def function2(self):
#code
player1 = Player(1,1,1,1,1,1)
player2 = Player(2,2,2,2,2,2)
...
player100 = Player(1,1,1,1,1,1)
while True:
player1.function1()
player1.function2()
...
...
player100.function1()
player100.function2()
#not efficient!
Here there are 100 elements in my class. I want to call function1() and function2() for each element of class in my main loop. I searched by myself but I couldn't find it. What is the efficient way to do it? Thanks in advance.