I have two string variables - string_A and string_B . string_A contains the following:
"ONE" # "TWO" # "THREE" # "FOUR" # "FIVE"
and string_B contains:
"NANA" # "PAA" # "THREE" # "ELI"
I want to remove all elements from string_A from string_B . After I type string_B , it should look like "NANA" # "PAA" # "ELI"
Update:
x = textA.split(' # ') y = textB.split(' # ') for i, j in enumerate(x): if j in y[i]: pass
source share