dataList = ['Adam','Jack','Subu','Mark'] # get index in list itemIndex = dataList.index('Jack') print 'Position in list: ',itemIndex # replace Jack with Tom dataList[itemIndex] = 'Tom' print 'Updated list: ', dataList
Output :
Position in list: 1 Updated list: ['Adam', 'Tom', 'Subu', 'Mark']