This might seem like an extremely niche issue, but it's a problem I struggled to solve with the existing resources on the internet. As a result, I'm here to share how I got it done!
Tag: Strings
The Difference Between str() and repr() in Python: A Design by Contract Perspective
Recently, I was giving a lecture about Java's "common" methods (i.e., all of the methods of Object), and I had epiphany about how Java only has toString() while Python has str() and repr(). So, it...
If you're looking to learn some Python, I have plenty of practice problems to get you started.
How to Capitalize a String in Python: Upper(), Capitalize(), And More
When it comes to capitalizing strings in Python, you have a few options. Use the tools Python provides or roll your own.
How to Convert an Integer to a String in Python: Type Casting and f-Strings
Today, we'll take a look at a few different ways to convert an integer to a string in Python. As it turns out, each solution takes just a couple characters.
How to Split a String by Whitespace in Python: Brute Force and split()
There are a lot of ways to manipulate strings. For instance, we might be interested in splitting a string by a separator like whitespace.