python去掉行尾的换行符

python去掉行尾的换行符

mystring.strip().replace(' ', '').replace('\n', '').replace('\t', '').replace('\r', '').strip()

posted @ 2015-02-07 20:24  emanlee  阅读(10324)  评论(0)    收藏  举报