Dec-12-2018, 12:25 AM
As nilamo and Gribouillis said, you shouldn't modify the list you are looping through. It's also bad to delete from a list that was passed to a function. This will change the list outside the function, which may not be expected. To avoid having the same pair in the list twice, you should check before appending (word, rev_word) to new_lst to make sure that (rev_word, word) isn't already in new_lst.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures