I have a 2 D tuple (Actually I thought, it was a list.. but the error says its a tuple) But anyways.. The tuple is of form: (floatnumber_val, prod_id) now I have a dictionary which contains key-> prod_id and value prod_name now.. i want to change the prod_id in tuple to prod_name So this is waht I did
#if prodName is the tuple
# prodDict is the dictionary
for i in range(len(prodName)):key = prodName[i][1] # get the prodidif prodDict.has_key(key):value = prodDict[key]prodName[i][1] = value
umm pretty straightforward but i get an error that TypeError: 'tuple' object does not support item assignment
Thanks!!