Following example in Section 4.2 would run into infinite loop.>>> for w in words[:]: # Loop over a slice copy of the entire list. ... if len(w) > 6: ... words.insert(0, w) ... >>> words ['defenestrate', 'cat', 'window', 'defenestrate']Should be something like this (but still leaves duplicate elements in the list):-----------------------------------words_tmp = copy.deepcopy(words)for w in words_tmp:if len(w)>6 :words.insert(0,w)-----------------------------------Thanks & RegardsAbhinav Tyagi