Learn various useful techniques to handle Python lists effectively. Discover the power of the * operator for combining and unpacking lists, the difference between .sort() and sorted(), and advanced methods like list comprehensions, .insert(), and .extend(). Understand the distinct advantages and limitations of tuples compared to lists.
Table of contents
12+ Things I Regret Not Knowing Earlier About Python Lists1) We can use * to combine lists2) We can use * to unpack lists3) Using * unpack a list as function arguments4) zip() to iterate through 2 lists concurrently5) enumerate() to generate both index and value during iterationQuick Pause6) .sort() vs sorted()7) .sort() with custom condition8) List comprehension9) Tuples vs Lists10) The .insert(index, element) method11) The .extend(other_list) method12) list[start:end] = [1, 2, 3]17 Things I Regret Not Knowing Earlier About Lists in PythonIf You Wish To Support Me As A Creator43 Comments
Sort: