码迷,mamicode.com
首页 > 编程语言 > 详细

python中无法被转化为set的list[list组成的list]

时间:2018-10-10 23:48:39      阅读:530      评论:0      收藏:0      [点我收藏+]

标签:pytho   traceback   erro   output   cal   line   last   ble   ror   

arr = [[a],[b]]

set(arr)

output:

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: unhashable type: ‘list‘

 

arr =[1,2]

set(arr)

output:

set([1,2])

python中无法被转化为set的list[list组成的list]

标签:pytho   traceback   erro   output   cal   line   last   ble   ror   

原文地址:https://www.cnblogs.com/alfredsun/p/9769458.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!