본문 바로가기
Algorithms

[Python] List cannot be an element in a set; use Tuple

by cocacola0 2022. 4. 23.

You can't add a list to a set because lists are mutable, meaning that you can change the contents of the list after adding it to the set.

 

Ref

https://stackoverflow.com/questions/1306631/add-list-to-set

댓글