I have no error message; this is a semantic error. My code is ignoring the string, "computers" in a list over which I am using a for loop nested in another for loop.
The purpose of the first for loop is to iterate over every string in genericList. At every string, I want the second for loop to iterate over every character within the string and remove the string from genericList if it finds an "r".
genericList = ["pie","harpoons","Halloween Candy","razors","computers","toys","viruses"] for stuff in genericList: for char in stuff: if char == "r": genericList.remove(stuff) break else: print "Here you go!" print genericList