5 Easy Ways to Download an Image from a URL in Python

Problem Formulation and Solution Overview In this article, you’ll learn how to download an image from the web in Python. To make it more fun, we have the following running scenario: Sven, a Journalist from Greeland, is writing about Glacier Calving. His editor would like photos of iceberg collapses in the area accompanying his article. … Read more

Setup a Virtual Environment with Visual Studio Code in Python

Problem Formulation and Solution Overview This article will show you how to create a Virtual Environment inside the Visual Studio Code, the VSC Editor. Virtual Environments are best used when a coder or several coders work together to develop medium to large-scale applications. The best approach is to keep this code and associated libraries and … Read more

Generate a Simple PDF using Python ReportLab (9 Steps)

Problem Formulation and Solution Overview This article shows how to generate a formatted PDF file from a CSV file using the ReportLab and Pandas libraries in conjunction with slicing. ℹ️ Python offers numerous ways to generate a PDF file. One option is to use the ReportLab library. The article selected the path that used the … Read more

How to Import External Code in Python

Problem Formulation and Solution Overview This article will show you how to import external Python code and use this code in another Python script. To make it more interesting, we have the following running scenario: 👩‍🏫 Fun Example: Pam, a High School Teacher, wants an easier way to calculate exam totals and produce student averages. … Read more

How to Create, Update, and Query an SQLite Database in Python?

Problem Formulation and Solution Overview This article will show you how to create, update and query a SQLite database using Python. ℹ️The SQLite database is a great choice! It is self-contained, easy to use, easy to learn, and works on other devices, such as game consoles, mobile phones, and so on! To make it more … Read more

How to Interpolate Strings

Problem Formulation and Solution Overview This article will show you how to interpolate strings in Python. ℹ️ Interpolation is used when a string contains a placeholder for a variable or a calculation. The string is evaluated, and the placeholder is replaced by the passed data. To make it more interesting, we have the following running … Read more

7 Pythonic Ways to Copy a Dictionary

Problem Formulation and Solution Overview This article will show you how to copy a Dictionary in Python 7 different ways. To make it more interesting, we have the following running scenario: Mr. Smith, a High School Math Teacher, has developed an exciting way to grade multiple-choice exams. He has designed a Dictionary with the exam … Read more

How to Export MySQL to a CSV (Dashboard+Python)

This article shows you how to export a Database Table to a CSV file using MySQL. ℹ️ SQL, an acronym for Structured Query Language, is the language of the Database! This standardized language is used to manage databases, tables and the data they hold. A must-have in the coding world. This language allows coders to … Read more

Parsing XML Files in Python – 4 Simple Ways

Problem Formulation and Solution Overview This article will show you various ways to work with an XML file. ℹ️ XML is an acronym for Extensible Markup Language. This file type is similar to HTML. However, XML does not have pre-defined tags like HTML. Instead, a coder can define their own tags to meet specific requirements. … Read more

How to Schedule a Batch Python Script

Problem Formulation and Solution Overview During your career as a Pythonista, you will encounter situations where a Python script will need to be executed on a scheduled basis, such as daily, weekly, or monthly. This article shows you how to accomplish this task using a .bat (batch) file. 💬 Question: How would we write code … Read more