Latest Posts From Vijaykrishna Ram

Python struct Module

The Python struct module is used to provide a simple Pythonic interface to access and manipulate C’s structure datatype. This can be a handy tool if you ever need to deal with C code and don’t have the time to write tools in C since it is a low-level language. This module can convert Python […]

Python chr() and ord()

Python’s built-in function chr() is used for converting an Integer to a Character, while the function ord() is used to do the reverse, i.e, convert a Character to an Integer. Let’s take a quick look at both these functions and understand how they can be used. The chr() function Syntax This takes in an integer […]

Python bytes()

Python bytes() is a built-in function which returns a bytes object that is an immutable sequence of integers in the range 0 <= x < 256. Depending on the type of object passed as the source, it initializes the byte object accordingly. Let’s look at how we can use this function in this article. Syntax […]

Python – Convert String to List

In Python, if you ever need to deal with codebases that perform various calls to other APIs, there may be situations where you may receive a string in a list-like format, but still not explicitly a list. In situations like these, you may want to convert the string into a list. In this article, we […]

Python String translate()

Python’s in-built method for the String class, str.translate(), is used to map a string with a translation table. The translate() method simply converts it using the translation table rules. Let’s understand more about the method in this article. Syntax of Python String translate() Since the translate() function returns a new string with each character in […]

Python – Concatenate string and int

In Python, we normally perform string concatenation using the + operator. The + operator, however as we know, is also used to add integers or floating-point numbers. So what would happen if we have a string and an int on both sides of the operand? Since Python is a dynamically typed language, we would not […]