remove
Publié : sam. mai 18, 2019 5:20 pm
Hello BP, to give a similarity of REMOVE Xcas cmd with REMOVE Python cmd, allows a second argument that disables the elimination of mutiplicity or occurrence
lst1:=[1,1,1,2,3,4,5,5]
lst1.remove(1) [enter]
[2,3,4,5,5] # ok
lst1:=[1,1,1,2,3,4,5,5]
lst1.remove(1,off) [enter]
[1,1,2,3,4,5,5]
lst1.remove(1,off) [enter]
[1,2,3,4,5,5]
lst1.remove(1,off) [enter]
[2,3,4,5,5]
lst1:=[1,1,1,2,3,4,5,5]
lst1.remove(1) [enter]
[2,3,4,5,5] # ok
lst1:=[1,1,1,2,3,4,5,5]
lst1.remove(1,off) [enter]
[1,1,2,3,4,5,5]
lst1.remove(1,off) [enter]
[1,2,3,4,5,5]
lst1.remove(1,off) [enter]
[2,3,4,5,5]