Get difference between two lists

前端 未结 27 3422
傲寒
傲寒 2020-11-21 11:36

I have two lists in Python, like these:

temp1 = [\'One\', \'Two\', \'Three\', \'Four\']
temp2 = [\'One\', \'Two\']

I need to create a third

27条回答
  •  天命终不由人
    2020-11-21 11:59

    If you are really looking into performance, then use numpy!

    Here is the full notebook as a gist on github with comparison between list, numpy, and pandas.

    https://gist.github.com/denfromufa/2821ff59b02e9482be15d27f2bbd4451

提交回复
热议问题