Skip to content

Python Lists

How to reverse a Python List Cover Image

How to Reverse a Python List (6 Ways)

Learn how to use Python to reverse a list, including how to use the reversed function, list indexing, and a python list comprehension.

Python Intersection Between Two Lists Cover Image

Python: Intersection Between Two Lists

Learn how to find the intersection between two lists in Python, including using list comprehensions, set methods and the numpy library.

Python Subtract Two Lists Cover Image

Python: Subtract Two Lists (4 Easy Ways!)

Learn how to use Python to subtract two lists, using the numpy library, the zip function, for-loops, as well as list comprehensions.

Python Split a List (In Half, in Chunks) Cover Image

Python: Split a List (In Half, in Chunks)

Learn how to split a Python list into n chunks, including how to split a list into different sized sublists or a different number of sublists.

Python Flatten List of Lists Cover Image

Python: Flatten Lists of Lists (4 Ways)

Learn how to use Python to flatten a list of lists, including using the itertools library, list comprehension, and multi-level lists of lists.