1/7
Few weeks into learning Python π and the shift is real. Just wrapped up the fundamentals of Python! Starting from variables to conditionals and now functions.
Here's my quick recap + mini wins after about 4 weeks of grinding.
List can be accessed through indexing positively (from the front) or negatively (from the back)
Slicing (:) is used to access range of elements on lists
Lists
Lists in Python are more than just arrays; they are dynamic containers. Mastering Indexing and List Methods is the bridge between simple scripts and data-driven applications. Itβs the difference between knowing a person's name and managing a directory of users.
Examples
β List with integers [5, 3, 30, 12, 100]
β List with strings ["KryptCity", "User", "Profile"]
β List with mixed data types [30, "KryptCity", 10.5]
β List with nested list ["Keyboard", 10, 15[1,5,9,8]]
π DCA Γ DataCamp 2026 Scholarship is LIVE!
Weβre giving out FREE DataCamp licenses (worth $150) to African data professionals ready to learn and grow.
If youβve been waiting for a sign to start or level up your data career, this is it.
Apply now at https://t.co/JsinpQ98B3
Looked more into function for better understanding and here is what Iβve added to my previous knowledge.
It is one of the most powerful and reusable building blocks in programming (not just Python alone)
@clcoding "Haven't seen this exact gotcha before π I'd run it in a REPL right now to check, but my guess will be A, following other responders.
Saving this to run it later. Learning moment for me! π