I want to call a value of an object stored in a list:
List is: circles #storing 40 circle objects
The object is: a circle storing values #direction in x and y
Now i want to call circles[0].dirnx but dirnx is a string called whichDir
In Code:
whichCircle = 0
whichSpeed = 1
whichDir = 'dirnx' # dirnx = direction in x
dots[whichCircle].whichDir = whichSpeed
Of course python creates dots[whichCircle].whichDir and stores whichSpeed
but i want to store in dots[whichCircle].dirnx
What is the proper way to do this?