I have a big list of the following form, for purposes of this question we'll refer to it as Kraftwerk
匹
屯
牙
友
I have another list of there following form, henceforth refered to as KomputerLove
兪
yú
部首:入
首尾分解: 人折
罙
shēn
部首:冖
首尾分解: 冖木
叇
dài
部首:厶
首尾分解: 云逮
Using the Kraftwerk as a reference, I want to whittle down KomputerLove so that if the main index of KomputerLove, i.e. in this example that would be ['兪','罙','叇']
does not appear in Kraftwerk we eliminate it.
I don't have much experience with such kind of searching and sorting operations, what would be the best way to accomplish this? It should be taken into account that both Kraftwerk & KomputerLove are in reality slightly large, on the order of 1,000's of indices.
Those lists are stored just as you see them in .txt files.