1.split()
abc='with three word'
staff=abc.split()
print(staff)
['with', 'three', 'word']
abc='with;three;word'
staff=abc.split(;)
print(staff)
['with', 'three', 'word']
2.rstrip()
str = " this is string example....wow!!! ";
print str.rstrip();
str = "88888888this is string example....wow!!!8888888";
print str.rstrip('8');
3.if not line.startwith('from')
判断line这一行最开始是不是“from”
list=[] 表示建立一个空的list
list.sort() 排序
list.append() 给line增加值
list.append(value)