example:
my list is ['tree','world','tre','worl']
my dict is {'tre':'good','worl':nice}
my scripts:
def replace(list, dictionary):
for i in list:
for k in dictionary:
list = list.replace(k, dictionary[k])
return list
print replace(input_file,curaw_dict)
but every time I receive the result is like:
goode
niced
good
nice
how can I make it more accurate make it like
tree
world
good
nice
Thanks alot