Python shutil: High-Level File Operations Demystified

Are you looking to copy, move, delete, or archive data with your Python programs? If so, youโ€™re in the right place because this article is all about the module thatโ€™s been specially designed for the job. Itโ€™s called shutil (short for shell utilities) and weโ€™ll be demystifying its key features by way a few simple … Read more

Python List: Remove Duplicates and Keep the Order

Removing duplicates from a list is pretty simple. You can do it with a Python one-liner:ย  Python set elements have to be unique so converting a list into a set and back again achieves the desired result. What if the original order of the list is important though? That makes things a bit more complicated … Read more

Python String Formatting: How to Become a String Wizard with the Format Specification Mini-Language

Python provides fantastic string formatting options, but what if you need greater control over how values are presented? Thatโ€™s where format specifiers come in.  This article starts with a brief overview of the different string formatting approaches. Weโ€™ll then dive straight into some examples to whet your appetite for using Pythonโ€™s Format Specification Mini-Language in … Read more