The remainder operator is a staple in Java, but did you know it works on doubles as well? Now, you know!
Tag: Language Features
How to Check if a String Contains a Substring in Python: In, Index, and More
One concept that threw me for a loop when I first picked up Python was checking if a string contains a substring. After all, in my first language, Java, the task involved calling a method like...
How to Merge Two Dictionaries in Python: Comprehensions, Unpacking, and the Union Operator
Dictionaries by themselves are a great tool, but what if we have more than one? Today, we're going to learn how to merge two dictionaries in Python.
As with many posts in this series, I'm interested in examining some of the pitfalls when learning to code. Today, we'll cover the pitfalls when copying mutable data types.
How to Write a List Comprehension in Python: Modifying and Filtering
After covering so many common problems, I thought it would be fun just to explore a chunk of syntax known as the list comprehension in Python.
As the collection of sample programs grow, I continue to discover interesting programming language features. In this article, I document some of the coolest programming language features I've come...