天天看點

strip

用于移除字元串頭尾指定的字元(預設為空格)

Help on built-in function strip:

strip(...) method of builtins.str instance

    S.strip([chars]) -> str

    Return a copy of the string S with leading and trailing

    whitespace removed.

    If chars is given and not None, remove characters in chars instead.