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.
Python, String
Here are two quick and elegant ways to check if a string is empty in Python.
Python, Function
Mutable default arguments can trip up Python beginners and veterans alike. Here's a quick workaround to deal with them.
Python, Error
It's generally not a good idea to use bare except
clause in Python, but do you know why?
Python, File
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, String
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
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, Setup
A very common problem when working with Python is having to remember the correct version. Luckily, there's an easy fix for that.
Python, Variables
Learn 3 easy ways to swap the values of two variables in Python.
Python provides two distinct comparison operators for different task. Stop mixing them up using this quick guide.
Python, String
Learn two ways to format a string in Python with this quick tip.
Python, List
Understand Python's named tuples and start using them in your projects today.
Python, Dictionary
Learn the difference between two common ways to access values in Python dictionaries and level up your code today.
Learn the difference between Python's built-in list sorting methods and when one is preferred over the other.
Python, String
Learn of the two different way to convert a string to lowercase in Python and understand when you should use each one with this quick guide.
Python, List
Learn everything you need to know about Python's slice assignment with this handy guide.