Article
Multiline strings are a useful feature in Python that allow you to create strings that span multiple lines of code. They can be especially helpful when you need to create long or complex strings, such as for formatting text, writing documentation, or storing data. In this article, we'll explore three...
Dimitrije Stamenic
In the world of software development, exchanging data between different systems is a common task. One popular format for data exchange is JSON (JavaScript Object Notation), which is a lightweight and easy-to-read format for data representation. In Python, JSON data can be easily converted to dictionary objects, and vice versa....
Cássia Sampaio
A programming language typically consists of several types of basic elements, such as assignments, conditionals, and loops. The idea behind a loop is to repeat a segment of code that is in the body of the loop. Different kinds of loops are common. For example, loops will run: while a...
Frank Hofmann
Repetitive tasks are ripe for automation. It is common for developers and system administrators to automate routine tasks like health checks and file backups with shell scripts. However, as those tasks become more complex, shell scripts may become harder to maintain. Fortunately, we can use Python instead of shell scripts...
Sajjad Heydari
Data can be represented in various forms - and a convenient way to represent dates and times are strings. However, to work with these dates and times in an arithmetic fashion (such as calculating time differences, adding or removing time, etc.) - we need to convert them to a datetime...
N Kaushik
A common task in programming is opening a file and parsing its contents. What do you do when the file you are trying to process is quite large, like several GB of data or larger? The answer to this problem is to read in chunks of a file at a...
Adam McQuistan
Python comes with a variety of useful objects that can be used out of the box. Date objects are examples of such objects. Date types are difficult to manipulate from scratch, due to the complexity of dates and times. However, Python date objects make it extremely easy to convert dates...
Nicholas Samuel
In Python, strings are sequences of characters, which are effectively stored in memory as an object. Each object can be identified using the id() method, as you can see below. Python tries to re-use objects in memory that have the same value, which also makes comparing objects very fast in...
With Python being a very popular programming language, as well as having support for most operating systems and many libraries that make command-line argument processing easy - it's become widely used to create command line tools for many purposes. These tools can range from simple CLI apps to those that...
© 2013-2025 Stack Abuse. All rights reserved.