摘要: 原文链接:http://www.juzicode.com/archives/2720 错误提示: #juzicode.com/vx:桔子codes1={1,2,3,4}#集合s1s2={3,4,5,6}#集合s2print('s1-s2:',s1-s2)pri... 阅读全文
posted @ 2020-12-19 11:46 桔子code 阅读(583) 评论(0) 推荐(0) 编辑
摘要: 原文链接:http://www.juzicode.com/archives/2715 错误提示: 构建set类型的数据时,使用tuple类型的数据作为元素没有问题,使用list、dict类型的数据作为元素报TypeError: unhashable type:... 阅读全文
posted @ 2020-12-19 11:42 桔子code 阅读(181) 评论(0) 推荐(0) 编辑
摘要: 原文链接:http://www.juzicode.com/archives/2711 错误提示: list使用数字类型的下标访问没有问题,字典使用数字类型的下标访问时提示KeyError: 0 #juzicode.com/vx:桔子codel = ['juzi... 阅读全文
posted @ 2020-12-19 11:32 桔子code 阅读(1211) 评论(0) 推荐(0) 编辑
摘要: 原文链接:http://www.juzicode.com/archives/2701 错误提示: 使用list的index方法查找元素时提示:ValueError: 20 is not in list #juzicode.com/vx:桔子codelst = ... 阅读全文
posted @ 2020-12-19 11:27 桔子code 阅读(945) 评论(0) 推荐(0) 编辑
摘要: 原文链接:http://www.juzicode.com/archives/2669 错误提示:进行除法运算时,提示ZeroDivisionError: division by zero #juzicode.com/vx:桔子codelst = [5,4,3,... 阅读全文
posted @ 2020-12-19 11:27 桔子code 阅读(835) 评论(0) 推荐(0) 编辑
摘要: 原文链接:http://www.juzicode.com/archives/2706 错误提示: 用tuple类型的数据作为字典的key不报错,用list类型的数据作为字典的key时,提示TypeError: unhashable type: ‘list’ ... 阅读全文
posted @ 2020-12-19 11:27 桔子code 阅读(225) 评论(0) 推荐(0) 编辑
摘要: 原文链接:http://www.juzicode.com/archives/2692 错误提示: 调用列表的元素时提示:IndexError: list assignment index out of range #juzicode.com/vx:桔子cod... 阅读全文
posted @ 2020-12-19 11:27 桔子code 阅读(479) 评论(0) 推荐(0) 编辑