Crawler小爬虫,总结
python数据类型
- 字符串,单引号双引号-普通字符串,三引号-跨行长字符串
str = 'this is string'
str = "this is also a string"
str = '''
this is a long string
which inclode many sustring
and multiple lines
'''
- 列表,用中括号
[]
表示,可以加入各种数据类型的数据
list = [1, 2 ,3, 4 ,5]
multipleTypeList = ['123', 123, otherType]
- 元组,定义好的元组中的不能够修改,但是可以用
del
删除,+
连接,*
复制元组,使用()
表示
tuple = (1, 2, 3, 4, 5)
multipleTypeTuple = (1, 2,