Hi i am stuck on change value in tuple type. i know i cant change value in tuple type but is there a way to change it ???
a=[('z',1),('x',2),('r',4)]
for i in range(len(a)):
a[i][1]=(a[i][1])/7 # i wanna do something like this !!!
i wanna change the the number in a to be the probability eg:1/7, 2/7, 4/7 and is there a way to change the number of a to be a float ?? eg
a=[('z',0.143),('x',0.285),('r',0.571)]