Welcome to the next unit of this course!
Before we get deeper into Python essentials for interview prep, we'll remind ourselves about some Python features - specifically, Python collections — Lists, and Strings. These collections allow Python to group multiple elements, such as numbers or characters, under a single entity.
Some of these concepts might already be familiar to you, so you can breeze through the beginning until we get to the meat of the course and the path.
As our starting point, it's crucial to understand what Python collections are. They help us manage multiple values efficiently and are categorized into Lists, Tuples, Sets, and Dictionaries.
We will focus mainly on Lists and Strings. A fun fact here is that Lists are mutable (we can change them after creation), while strings are immutable (unalterable post-creation). Let's see examples:
Imagine having to take an inventory of all flora in a forest without a list at your disposal — seems near impossible, right? That's precisely the purpose Lists serve in Python. They let us organize data so that each item holds a definite position or an index. The index allows us to access or modify each item individually.
Working with Lists is as simple as this:
