numpy.core.defchararray.strip()

numpy.core.defchararray.strip

numpy.core.defchararray.strip(a, chars=None) [source]

For each element in a, return a copy with the leading and trailing characters removed.

Calls str.rstrip element-wise.

Parameters:

a : array-like of str or unicode

chars : str or unicode, optional

The chars argument is a string specifying the set of characters to be removed.