At first, sorry if this is a really stupid question, but im a bloody python beginner and haven't found solution yet
I have given a list and have to subtract a certain value from each element of this list
my current approach is the following:
positions = [10, 45, 66, 110]
subtraction_value = 8
for x in range(len(positions)):
delta_distance = int(positions[x])-subtraction_value
I understand that I cant subtract a value from a list but i cant think of a way to update the position for every iteration
Hopefully the problem is somewhat understandable, english is unfortunately not my main language.