I have two lists named res_list
and fina_list
. I want the first member of the res_list
as key and first member of fina_list
as the value and so on. Both the list are of the same length. I have written following code but I am not getting the answer please help me on this.
for i in range(0, len(prot_temp)):
dict_dist[res_list_count[i]] = fina_val[i]
print (dict_dist)
res_list = ['LYS', 'LYS', 'LYS', 'LYS', 'ARG', 'LYS', 'LYS', 'LYS', 'ARG', 'LYS', 'LYS', 'ARG', 'LYS', 'ARG', 'LYS', 'LYS', 'ARG', 'LYS', 'ARG', 'ARG', 'ARG', 'LYS', 'LYS', 'LYS', 'LYS', 'LYS'] and fina_val = [['90', 30.390685694798005], ['91', 33.017900690383094], ['99', 25.200985952934463], ['104', 19.14776281971343], ['113', 20.365273138359818], ['114', 21.71637709195528], ['135', 29.452559922696025], ['138', 24.335606731700775]] but when I am doing as you said I am geeing fillowing answer: {'LYS': ['302', 25.757180610462783], 'ARG': ['282', 17.118237438474793]} where i am wrong ?