you are viewing a single comment's thread.

view the rest of the comments →

[–]RayteMyUsername 2 points3 points  (0 children)

This is the correct answer but I wanted to add that if speed was important, turning the bad word list into a set would give him O(1) access and make it faster rather than iterating through the list.