I\'d like to store a lot of words in a list. Many of these words are very similar. For example I have word afrykanerskojęzyczny and many of words like afr
afrykanerskojęzyczny
afr
I like the ndiff answer, but if you want to spit it all into a list of only the changes, you could do something like:
import difflib case_a = 'afrykbnerskojęzyczny' case_b = 'afrykanerskojęzycznym' output_list = [li for li in difflib.ndiff(case_a, case_b) if li[0] != ' ']