Python Learn 0420

来源:互联网 发布:淘宝注册页面代码 编辑:程序博客网 时间:2024/06/05 07:27

robots.txt
大多数网站的爬虫协议

user_agent={ 'User=agent':'Mozilla/5.0' }

序列

a[::-1}#倒序
x=[1,2,3]y=['a','b','c']list(zip(z,b,c)]

字符串
三引号可以换行

cont = 0atr = "helllo,woe..ld"for ch in atr:    if ch in '.,?!':        cont += 1;

输入输出

0 0