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

제목실습 14에 첫번째 문제2019-05-07 20:05
작성자

language = ["python", "c++", "javascript", "go"]

author = ["Guido van Rossum", "Bjarne Stroustrup", "Brendan Eich", "Robert Griesemer"]



def matingParis(language,author):

    result=set()

    for i in [0,1,2,3]:

        ele=[language[i],author[i]]

        new=([])

        new=ele

        result.add(new)

      

    return result


print(matingParis(language,author))


이렇게 햇는데 오류가 result.add(new) 여기서 TypeError: unhashable type: 'list'이렇게 뜹니다

다른 방법이 생각이 안나는데 어떻게 해야할까요??

댓글