Hi everyone. I am using python for coding an algorithm and I'm struggling with usage of while and append.
the part of code is:
However the value of variable changes midway.
Here is same output:
the part of code is:
print('isis') print(temp11) print(main_list[9][6]) # this variable's value is different now temp_cluster.clear() print(temp_cluster) temp_cluster.append(Node_Names[temp11]) print(main_list[9][6]) # and the same variable's value is different nowLater on, I am changing main_list[9][6] to temp_cluster. but that is after the above sentences.
However the value of variable changes midway.
Here is same output:
Output:isis
10
['j', 'i'] # as you can see value has changed from 'j' 'i' to 'k' after 2 sentences
[]
['k']
exy
Can anyone help me with this?