Enumerating something adds values (numerical) to the items. In Python, when iterating over an array, it's sometimes beneficial to get the item with the index. Take for example the iterations below.
One of the basic built-in data types in Python, a string, is a sequence of text characters. strings are declared with quotation marks ... You can also try to coerce other data types to be a string using the built-in str() function. Strings are used all over the place in Python.
When developers build an API they define API routes. These are URLs on the server that process the HTTP request arguments and return data based on those arguments (or an error). Each route has an accepted HTTP method that you must use. For example, I might have a profile picture on my API at
Before doing a difficult task, it helps to have a process. Processes allow you to reduce the cognitive load of a task by outsourcing part of the "figuring out" to the process. Processes can—also—reduce the chance that you will miss something obvious, or waste time trying to
There comes a point in a beginner Python developer's life when he wants to leave the nest and starting importing and reusing his own functions. However, just like with any programming language, there are conventions and syntax that dictate how to export or import code to different modules.
Python decorators have a mysterious presence. This is true for a developer that has some Python knowledge, and definitely the case for someone new to programming. The first time I used a decorator in Python was with the Flask web framework, and I kept looking at the line of code it was on like it
The timeit module is a trustworthy way to test small blocks (or bits as mentioned in the documentation ) of Python code. You might think that testing Python code is quite straightforward:
Destructuring is a nice tool to be familiar with in Python. As with many Python features, the benefits include cleaning up code and ease of programming. In this post, I'll take a quick look at how packing and unpacking work in Python.