Skip to content

Instantly share code, notes, and snippets.

@iisaka51
Created October 25, 2022 23:01
Show Gist options
  • Save iisaka51/2be1fc1dbee9b7f4919fb6871f0c854d to your computer and use it in GitHub Desktop.
Save iisaka51/2be1fc1dbee9b7f4919fb6871f0c854d to your computer and use it in GitHub Desktop.
without method of ilist
In [1]: from datajuggler import iList
In [2]: l1 = iList([1,2,3,4,5,6])
...: result = l1.without([3])
...: assert result == [1,2,4,5,6]
In [3]: l1 = iList([1,2,3,4,5,6])
...: result = l1.without([0])
...: assert result == l1
In [4]: l1 = iList([1,2,3,4,5,6])
...: l2 = [3,4,5]
...: result = l1.without(l2)
...: assert result == [1,2,6]
In [5]: l1 = iList([1,2,3,4,5,6])
...: l2 = [3,4]
...: l3 = [5,6]
...: result = l1.without(l2, l3)
...: assert result == [1,2]
In [6]:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment