Python 101

An Intro to Python Virtual Environments

Python has the concept of the virtual environments built-in to the language. A Python virtual environment is an environment where you can install 3rd party packages for testing without affecting the system Python installation. Each virtual environment has its own set of installed packages and, depending on the virtual environment and how it’s set up, …

An Intro to Python Virtual Environments Read More »

OpenPyXL – Working with Microsoft Excel Using Python

The business world uses Microsoft Office. Their spreadsheet software solution, Microsoft Excel, is especially popular. Excel is used to store tabular data, create reports, graph trends, and much more. Before diving into working with Excel with Python, let’s clarify some special terminology: Spreadsheet or Workbook – The file itself (.xls or .xlsx). Worksheet or Sheet …

OpenPyXL – Working with Microsoft Excel Using Python Read More »

Python 101: An Intro to Working with JSON

JavaScript Object Notation, more commonly known as JSON, is a lightweight data interchange format inspired by JavaScript object literal syntax. JSON is easy for humans to read and write. It is also easy for computers to parse and generate. JSON is used for storing and exchanging data in much the same way that XML is …

Python 101: An Intro to Working with JSON Read More »

Python 101 – Learning About Loops (Video)

In this tutorial, you will learn how to use for and while loops in Python. Specifically, you’ll learn how to: Create a for loop Loop over a string Loop over a dictionary Extract multiple values from a tuple Use enumerate with loops Create a while loop Breakout of a loop Use continue Use else with …

Python 101 – Learning About Loops (Video) Read More »

Python 101 – Debugging Your Code with pdb

Mistakes in your code are known as “bugs”. You will make mistakes. You will make many mistakes, and that’s totally fine. Most of the time, they will be simple mistakes such as typos. But since computers are very literal, even typos prevent your code from working as intended. So they need to be fixed. The …

Python 101 – Debugging Your Code with pdb Read More »

Python 101 – Launching Subprocesses with Python

There are times when you are writing an application and you need to run another application. For example, you may need to open Microsoft Notepad on Windows for some reason. Or if you are on Linux, you might want to run grep. Python has support for launching external applications via the subprocess module. The subprocess …

Python 101 – Launching Subprocesses with Python Read More »