I'm having some issues with my code:
word_list = { "hello" : "1", "bye" : "2"}
sentence= ['hello you, hows things', 'hello, good thanks']
for key, value in word_list.iteritems():
for i in sentence:
i = i.replace(key, value)
print i
Expected output = '1 you, how's things', '1, good thanks'
It currently does not replace any occurrences of hello. I'm wondering if my sentence loop is correct or not? Printing i after this prints out exactly what is in sentence.