remove returns nothing. It modifies the existing list in place. No appointment required.
Replace
var = ['p', 's', 'c', 'x', 'd'].remove('d')
with
var = ['p', 's', 'c', 'x', 'd'] var.remove('d')
Now var will have the value ['p', 's', 'c', 'x'] .
Kevin source share