hello guys, my question is how to relate these two lists, for example: if the DISTANCE of force 1 is 3 and this is in index 4 of the first list, the FORCE of force 1 should be found in index 4 of the second list.

What I have tried :

from math import *
a=0
l=int(input(' beam length = ') )
x=int(input(' leading end value = ') )
y=int(input(' endpoint value = ') )
f1=int(input(' force 1 = '))
x1=int(input(' distance 1 = '))
f2=int(input(' force 2 = '))
x2=int(input(' distance 2 = '))
p=int(input(' points = ') )
distĂ˘ncia = [ ]
distĂ˘ncia.append(0)
for n in range(0,p):
a +=(l/p)
distĂ˘ncia.append(a)
print(' distance = ',distĂ˘ncia)
lst = [0] * p
lst[0]=x
lst[-1]=y
print(' forces acting on points = ',lst)

basically, for example if force 1 = 5 and distance 1 = 3 â€¦ if in the first list 3 is index 4 , in the second 5 must be placed in index 4 of the other list