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