How to Get the First Character of a String

Problem Formulation and Solution Overview This article will show different ways to extract the first character of a Python string. To make it more interesting, we have the following scenario: The Government has asked Rivers Clothing to complete forms for each employee. These forms require the first character of the employee’s first name and their … Read more

Working with Markdown Files in Python

This article will show you how to create and work with markdown files using Python. πŸ’‘ Markdown is an excellent tool with many features to spice up a flat-text file, such as changing text colors, adding bullet points, tables, and much more. A terrific way to add pizzazz to an otherwise dull file. To make … Read more

How to Add Elements to a Python Set

Problem Formulation and Solution Overview This article will show you how to add elements to a Python set. ℹ️ Info: A Python set is a collection of unique item(s) saved in no particular order (unordered). A set cannot be changed. However, elements can be added and removed. Sets can also perform calculations like union, intersection, … Read more

Python Create JSON File

Problem Formulation and Solution Overview This article focuses on working with a JSON file. JSON is an acronym for JavaScript Object Notation. This is a flat-text file formatted based on JavaScript (JS) Syntax. This file is most commonly noted for its ability to transmit data to/from web applications, such as sending/receiving data from a Server/Client … Read more

How to Filter Data from an Excel File in Python with Pandas

Problem Formulation and Solution Overview This article will show different ways to read and filter an Excel file in Python. To make it more interesting, we have the following scenario: Sven is a Senior Coder at K-Paddles. K-Paddles manufactures Kayak Paddles made of Kevlar for the White Water Rafting Community. Sven has been asked to … Read more

6 Ways to Remove Python List Elements

Problem Formulation and Solution Overview This article will show you how 6 ways to remove List elements in Python. To make it more interesting, we have the following running scenario: Suppose you have a Christmas List containing everyone to buy a gift for. Once a gift is purchased, remove this person from the List. Once … Read more

How to Read the First Line of a File in Python

Problem Formulation and Solution Overview This article will show you how to read and display the first line of a file in Python. For this article, we will work with a flat-text file containing five (5) possible things to do during your lifetime. This file is saved to bucket_list.txt and placed into the current working … Read more