I create a list, and I want to remove a string from it.
Ex:
>>> myList = [\'a\', \'b\', \'c\', \'d\'] >>> myList = myList.remove
Remember that lists are mutable, so you can simply call remove on the list itself:
remove
>>> myList = ['a', 'b', 'c', 'd'] >>> myList.remove('c') >>> myList ['a', 'b', 'd']
The reason you were getting None before is because remove() always returns None
None
remove()