其实本来是要reverse一下list的,就去查了一下list[::-1]是什么意思,发现还有很多要注意的地方,所以就记一下。
主要是参照https://docs.python.org/3/library/stdtypes.html?highlight=list#list
首先Sequence type有三种
list
tuple
range
slice
[i:j:k]表示的是slice of s from i to j with step k, 对三种类型都
在写爬虫,往csv写入文件时候报错
'gbk' codec can't encode character '\U0001f370' in position 5: illegal multibyte sequence
去一看名字我懵逼了是个emoji????
原来代码是这么写的
设置csv文件位UTF-8,代码改为
for i in b:
persons = str(i).replace('u','').replace('\'','')
This paper presents a method to predicate news reader emotions. News headlines supply core information of articles, thus they can serve as key information for reader emotion predication. However, headlines are always short which leads to obvious data