Thanks for info! Well, yeah... Final project will be written in C++. I was just hoping to write the code for Blender Game Engine. In my case the map() won't work because my for loop looks near like this:
for j in self.joints:
o1 = j.object1
o2 = j.object2
j.integrate(o1, o2)
# j is a class, j.object1 and j.object2 are classes, integrate(self, o1, o2) is a function inside j class
class j:
...some stuff here...
def integrate(o1, o2):
distance = (o1.position - o2.position).magnitude
...more stuff here...
This is how the code looks, more or less...