#python #anaconda #jupyter-notebook #visual-code #html #css #javascript #http

제목[re]Step_14 dictionary 멤버 갯수 unhashable type: 'list'2020-05-12 09:56
작성자

list는 hashable 하지 않기 때문에 set에 넣을수 없습니다.

hashable의 의미는 다음과 같습니다.

An object is hashable if it has a hash value which never changes during its lifetime 


그래서 set에는  lists나 dictionaries 와 같이 mutable 컨테이너는 넣을수 없고,

tuples이나 frozensets와 같이  immutable containers는 넣을 수 있습니다.  

댓글