Created
October 25, 2022 23:01
-
-
Save iisaka51/2be1fc1dbee9b7f4919fb6871f0c854d to your computer and use it in GitHub Desktop.
without method of ilist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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