Using Strings With ByteArray in Python

In this article, let us see how to effectively work with strings while using the Bytearray data structure in Python. A Quick Refresher on Bytearray ByteArray is a data structure in Python that can be used when we wish to store a collection of bytes in an ordered manner in a contiguous area of memory. … Read more

Python Raising Error With a Custom Message

In this article, we’ll see how to raise an error with a custom message in Python. We’ll learn how to use the ‘raise’ statement and we’ll practice all of this with the help of examples. Raising Exception The ‘raise’ statement allows you to throw/raise any error manually.  For example: Raising Exception with Custom Message We … Read more

Python: Logging Errors to a Text File

In this article, let us see how we can catch exceptions and log them onto a text file. Logging is a tool used in software engineering to track any and all the events that occur when your program runs. It’s like leaving a trail of breadcrumbs. When something goes wrong, we know where to start … Read more

Python if with 3 conditions: Explained with Examples!

In this article, let’s look at constructing the ‘if statement’ with 3 conditions. If you are relatively new to programming, I suggest reading our other articles on the if statement and if statement with 2 conditional statements before continuing this one. Alright, let’s begin! How to write an if statement with 3 conditions? Here’s the … Read more