NRNicolas Royinnroy.hashnode.dev·Oct 9, 2021 · 2 min readPython List Comprehensions 1 - Swap CasePython list comprehensions are an awesome way to condense common loops into one line of code. When we need to make new lists where each element is the result of some operations applied to each member of another sequence or iterable, or to create a su...00
NRNicolas Royinnroy.hashnode.dev·Oct 7, 2021 · 3 min readNested Lists in PythonWhat are nested lists? Put simply, they are lists within lists. A list is a data structure in Python that can contain any type of object, including other lists. Nested lists are useful for creating hierarchical data structures that contain categories...00