로딩
요청 처리 중입니다...

[python] TypeError: unhashable type: 'list'

 [python] TypeError: unhashable type: 'list'

#python #error #typeerror 해당 에러는 딕셔너리의 key값에 list자료형을 넣으려는 시도하는 경우에 발생합니다. a = {['a']:3, 'b':1} --------------------------------------------------------------------------- TypeError Traceback (most recent call last) in ----> 1 a = {['a']:3, 'b':1} 2 print(a) TypeError: unhashable type: 'list' 다음과 같이 key부분에 list가 들어가지 않게 수정해주면 됩니다. a = {'a':3, 'b':1} print(a)...

# error # python # typeerror