Posts

Showing posts from February, 2023

Featured Post

Learn Python by Coding a Simple To-Do List in Python from Scratch

Image
Introduction This simple project in Python will not only teach you to build a simple ToDo List, but also assist you to learn basic Python concepts along the way! The basic concepts that you will be learning are about using the indefinite loop, that is, while True, how to stop the loop, if-elif-else loops, and also about creating a functional to do list in which the user is able to not only add items, but also, view items, update or edit them, remove items and also delete the entire list itself.  Please note this is Part 4 of my Python series. If you missed the algorithms and planning stages, check out Parts 1, 2, and 3 on my Substack! What We Want Our To do List to do Defining the Problem : Creating a storage space for storing the to do list grocery items that I want to shop. I want to make the list with a menu that shows a menu of choice with features such as Add, View, Edit, Remove, Delete and Exit options. So, I need a way to add items, view them, edit them, remove any of the it...

A Simple Guide to Python Lists

A Simple Guide to Python Lists What are Lists  Lists in Python are built-in data structures to store items in a specified order. Lists store multiple items in a single variable. Sometimes, they could also be not carrying any item, that is, they could be empty as well.  Let us delve deeper into the concept of lists, how they are created and what methods we can perform with lists. Define Lists  Lists are built-in data structures  in Python, that store multiple items with a specified order, in a single variable. How to Create a List To create a list, for example , below, we use a variable called names and store all strings, namely, "Jay", "Ann" and "Alan" using the square brackets and then we run the print command. We also consider another variable numbers storing numbers 1,2,3  as shown below. names = ["Jay","Ann","Alan"] print(names) numbers = [1,2,3] print(numbers)   What are List Items The list items could be o...