Python - input时的strip()

例如在读文件里面的文本时,每一行默认后面有\n或者有\r,所以strip用于去除首尾空格或者回车符。

posted @ 2018-08-02 19:14  Rocin  阅读(5304)  评论(0编辑  收藏  举报