去空格

#去空格
def a(name):
    b = name.strip()#括号不放东西
    return b

strip 同时去掉左右两边的空格
lstrip 去掉左边的空格

rstrip 去掉右边的空格;

猜你喜欢

转载自blog.csdn.net/hnanxihotmail/article/details/80885045
今日推荐