Python How To Fix TypeError: unhashable type: 'list' (Troubleshooting #2)

Поделиться
HTML-код
  • Опубликовано: 4 ноя 2024
  • НаукаНаука

Комментарии • 6

  • @DataAnalyticsIreland
    @DataAnalyticsIreland 3 года назад +2

    Thanks a million for the shout out, I'll link back to this video, from my website. Just watched your video, great explanation 👍 👍

    • @BrandonJacobson
      @BrandonJacobson  3 года назад +1

      Thanks! You definitely are more advanced with Python than I am, but if there's anytime you need my help, please let me know!

    • @DataAnalyticsIreland
      @DataAnalyticsIreland 3 года назад

      @@BrandonJacobson Right linked to your channel and video in my blog post above!

  • @DhavalAhir10
    @DhavalAhir10 9 месяцев назад

    A = set() #Empty Set
    element = (5, 6, [ "Apple" ])
    A.add(element)
    TYPEERROR : unhashable type list.
    The reason is tuple is immutable but in our case tuple element variable is not immutable.
    We can access element[2] and then element[2].append("banana")
    So when we are adding this the list inside tuple cannot be a hashable.

  • @jefecito5108
    @jefecito5108 3 года назад +2

    Dat thumbnail tho