The coding articles collection contains curated stories, tips, questions and answers on a wide variety of topics. The main focus of these articles revolves around the languages and technologies presented in snippets, as well as career advice and lessons.
There's a good way to test the emptiness of a Python list and a better one. Which one are you using?
Python, List · Jan 15, 2023
Learn how to sort a Python dictionary list using a tuple key.
Python, List · Jan 4, 2023
Here are two quick and elegant ways to check if a string is empty in Python.
Python, String · Aug 5, 2022
Mutable default arguments can trip up Python beginners and veterans alike. Here's a quick workaround to deal with them.
Python, Function · Feb 27, 2022
It's generally not a good idea to use bare except
clause in Python, but do you know why?
Python, Error · Feb 20, 2022
When working with files in Python, it's important to ensure that the file is closed correctly. Here are a couple of ways to do that.
Python, File · Feb 3, 2022
Oftentimes you might need to trim whitespace from a string in Python. Learn of three different way to do this in this short guide.
Python, String · Dec 13, 2021
Python's f-strings can do a lot more than you might expect. Learn a few useful tips and tricks in this quick guide.
Python, String · Jul 20, 2021
A very common problem when working with Python is having to remember the correct version. Luckily, there's an easy fix for that.
Python, Setup · Jun 12, 2021
Learn 3 easy ways to swap the values of two variables in Python.
Python, Variables · Nov 7, 2021
Python provides two distinct comparison operators for different task. Stop mixing them up using this quick guide.
Python, Type · Jun 12, 2021
Learn two ways to format a string in Python with this quick tip.
Python, String · Jun 12, 2021
Understand Python's named tuples and start using them in your projects today.
Python, List · Jun 12, 2021
Learn the difference between two common ways to access values in Python dictionaries and level up your code today.
Python, Dictionary · Jun 12, 2021
Learn the difference between Python's built-in list sorting methods and when one is preferred over the other.
Python, List · Jun 12, 2021