\n\t 制表符和换行符
>>> print("Languages:\n\tPython\n\tC\n\tJavaScript")Languages: Python C JavaScript
strip() 删除字符串开头和末尾多余的空白
>>> favorite_language = ' python '>>> favorite_language.rstrip() #删除结尾的空白' python'>>> favorite_language.lstrip() #删除开头的空白'python '>>> favorite_language.strip() #删除所有的空白'python'