I have an array, that each index will follow another index, and the index will not follow same index. After that index is current and index will be followed by index is target
This is code for python
list_value = [1,2,3]
for current in range(len(list_value)):
for target in range(len(list_value)):
if current == target: continue
list_target.append(target)
expected output is {current:0, target:[1,2,0,2,0,1]}
but the result what i need is
{current:0, target:[1,2]}
{current:1, target:[0,2]}
{current:2, target:[0,1]}
I only add new target and repeatedly till the length of list_value done, I need help, please
thanks a lot