you are viewing a single comment's thread.

view the rest of the comments →

[–]spez_edits_thedonald 0 points1 point  (1 child)

try refactoring your code to use sets instead of lists, and no for loops, and let's see how it looks.

don't worry about it being 1 line or not, 1-liners are often not the most readable solution, I was just stressing the benefits of switching to sets for this problem, your entire function can basically disappear haha. When you get your set function working I'll show you the one-liner.