To make the q simple: i want to access inner array elements by the names of the inner arrays. thanks
here's a more complex explanation:
I have those arrays:
animatorsNames = ["jun","sonny"," xandy"]
jun = ["rifai","hassan ","ali"]
sonny = ["omar", "khaled"]
xandy = ["heba","zuhdi", "lutfi"]
animators = [jun,sonny,xandy]
I want to go over the array with loops like this:
for scene in animatorsNames :
for animator in scene:
do something
th problem is that i want to access the array elements through the names of those inner arrays, jun, sunny, etc. but when i go over the second loops, it treats the animator variable as a variable, rather than an array. which is the right thing for it to do. but how would i be able to achieve it to go over those variables as if they are the inner arrays.
I hope it was clear, any help is appreciated.
thanks a lot ppl :D
here's a more complex explanation:
I have those arrays:
animatorsNames = ["jun","sonny"," xandy"]
jun = ["rifai","hassan ","ali"]
sonny = ["omar", "khaled"]
xandy = ["heba","zuhdi", "lutfi"]
animators = [jun,sonny,xandy]
I want to go over the array with loops like this:
for scene in animatorsNames :
for animator in scene:
do something
th problem is that i want to access the array elements through the names of those inner arrays, jun, sunny, etc. but when i go over the second loops, it treats the animator variable as a variable, rather than an array. which is the right thing for it to do. but how would i be able to achieve it to go over those variables as if they are the inner arrays.
I hope it was clear, any help is appreciated.
thanks a lot ppl :D
Comment