Removing an item from a list in groovy

Am trying to remove an item from a list using groovy but it keeps failing i tried:

The value is ‘Key’ and has an index of 0

list.remove(0)

columns.removeAll{ it == ‘Key’}

neither of the above work
do i need to import a namespace?

hi,

please add some log of this issue