The described issue is even simpler in shell scripting:
cat file1.txt file2.txt | tr A-Z a-z | sort | uniq > whitelist.txt
Does this mean people aren't going to move from shell scripting to other languages? No, it just means the task is particularly suited to scripting like this, and Python has affordances for scripting.