摘要:
一、列表 # len(list)列表元素个数 # max(list)返回列表元素最大值 # min(list)返回列表元素最小值 # list(seq)将元组转换为列表 # list.append(obj)在列表末尾添加新的对象 # list.count(obj)统计某个元素在列表中出现的次数 # 阅读全文
posted @ 2022-10-10 12:16
样子2018
阅读(82)
评论(0)
推荐(0)
摘要:
# clear() 清除字典。 # get() 如果键存在于字典中,则返回该键的值。 # items() 返回字典中的键值对列表。 # keys() 返回字典中的键列表。 # values() 返回字典中的值列表。 # pop() 从字典中删除一个键,如果它存在,并返回它的值。如果存在于字典 阅读全文
posted @ 2022-10-10 12:11
样子2018
阅读(200)
评论(0)
推荐(0)
摘要:
# 1、index(value, start, end):在区间查找value出现的位置索引。 # 2、count(value):计算元组中value元素出现的个数。 # index和count与字符串和列表中的用法相同 if __name__ == "__main__": t1 = ("1", 1 阅读全文
posted @ 2022-10-10 10:57
样子2018
阅读(63)
评论(0)
推荐(0)
摘要:
代码只能作为学习,请不要用于其他。 一、效果图 二、代码编写 1、items.py # -*- coding: utf-8 -*- # Define here the models for your scraped items # # See documentation in: # https:// 阅读全文
posted @ 2022-10-10 08:42
样子2018
阅读(159)
评论(0)
推荐(0)

浙公网安备 33010602011771号