标签:top cal art 空格 pre rip topic height bsp
for x in topic_replay:
# 去掉在x左右的空白,\t,\n和\r字符.
x1 = x.strip(‘ \t\n\r‘)
if x1 !=‘‘:
topic_replay_end.append(x1)
# 先将文章中的\r 都去掉,有些单独的‘\r‘ 就变成了空的列表元素:‘‘,再用if 来判断下就好了
artical_end = []
for x in article:
x1 = x.replace(‘\r‘,‘‘)
if x1 != ‘‘:
artical_end.append(x1)
标签:top cal art 空格 pre rip topic height bsp
原文地址:http://www.cnblogs.com/vivivi/p/7142069.html