The following code:
exec(str(newName) + " = Leagues('"+str(name)+"','" + str(ldata[2]) + "'," + str(teams) + "," + str(len(teams)) + "," + str(ldata[3]) + "," + str(ldata[4]) + "," + str(ldata[5]) +")")
Runs without a syntax error however does not carry out its purpose (define an object of a class, "Leagues").
The code operates in a loop so it essentially looks like this (without the array indexing and breaks in the speech marks):
exec("EnglishDivision1 = Leagues('English Division 1','England',[#an array],20,4,3,3)")
The code above runs but does not actually create an object. However, when I enter this exact code without the exec command, it works just fine and an object is created. Anyone know what's going on?