filmov
tv
Python Extended Unpacking - Prevent 'Too Many Values to Unpack' Error

Показать описание
#Python #Shorts
Any time there's an asterisk (*) sign in code, I get scared since typically it refers to pointers. Luckily, when you see a * in Python, one of the ways it is used is while "unpacking", if you want to set certain elements from an iterable to variables and keep using the rest as iterables. So, if you got a "Too Many Values to Unpack" error, watch this video and see how to get rid of it!
-------------------------------------------------------------------------------------
Links:
Any time there's an asterisk (*) sign in code, I get scared since typically it refers to pointers. Luckily, when you see a * in Python, one of the ways it is used is while "unpacking", if you want to set certain elements from an iterable to variables and keep using the rest as iterables. So, if you got a "Too Many Values to Unpack" error, watch this video and see how to get rid of it!
-------------------------------------------------------------------------------------
Links: