I've found a way to create new lists with this method where p is an integer variable:
L=""
L= "player" + str(p) + "=[]"
exec(L)
However I don't know how to refer back to these list using a variable. when p=5, the list player5=[] is created. But I can't refer back to it as (playerp), since p doesn't get converted to 5 like a variable. How can I refer back to the list playerp?
p=10
print(player10)
M= "player" + str(p)
print(M)
print(M is player10)
output:
[]
player10
False
right now M is the string "playerp", how do I make it so that M will refer to the list playerp instead of the string "playerp"(player10 in the example)?