When writing Python code, backslash (“\”) can be used in two instances – as a line continuation character on the code or as an escape character when printing output on stdout, or when writing text into a file. In the first case, the backslash is used to break a long line of Python string, dictionary, set, and lists (maybe there’s more). For example,Continue reading
What are hash functions and hash values?
A hash function is any function that maps input of varied sizes into a fixed-size output. The values returned by the hash function are called hashes, hash values, hash codes, checksums, or hash digests.Continue reading
Data behind an API endpoint can be secured or not. Anyone can access the data using the API address if it is not secured. On the other hand, for secured APIs, the user must be authenticated before being authorized (allowed access).Continue reading
The Python error we are discussing here is of AttributeError class. AttributeError generally occurs because an attribute (function object of a class) you are trying to access does not exist.Continue reading
Python-pip, by default, installs packages on a global scope – for all users. In Unix-based systems, the packages are installed on /usr/local/bin/ whereas, on Windows, they are located on the Program Files directory.Continue reading
In this tutorial, we will discuss how to remove the last word in a block of Python string, as shown in the example image below.Continue reading
Python throws the TypeError <object> is not subscriptable if you attempt to index using index operator ([ ]), an object which is not indexable. An indexable object contains the __getitem__() magic/dunder function, which allows the object to act as a container for some items.Continue reading
This is a Python TyperError that occurs when we try to call a function with a keyword argument that is not expected by the function. Let us reproduce the error and then see how to solve the error.Continue reading
There are two ways you may want to run a Python script located in another folder – as a regular script or import and run it as a module. This article focuses on how we can do this.Continue reading
What are Unicode Characters?
Character encoding, in simple terms, is a process of translating characters into integers or sequences of bits. Any character we can write has a corresponding representation in Unicode that is universally accepted across different languages.Continue reading