s=' abcd '
s.lstrip()
s.rstrip()
s.strip()
只能去除两边的空格或者‘\n’
转载于:https://www.cnblogs.com/ezway/p/6350163.html