📜  remover espaços string python 代码示例

📅  最后修改于: 2022-03-11 14:45:32.190000             🧑  作者: Mango

代码示例1
string = "    *****    "

print(string.lstrip());
# Saída: '*****   '

print(string.rstrip());
# Saída: '   *****'

print(string.strip());
# Saída: '*****'