Latest Posts From Safa Mulani

Python Bytearray() Function

Python bytearray() function

In this article, we will be having a look at one of the Python’s in-built function — Python bytearray() function. Understanding Python bytearray() function Python has in-built bytearray() method that creates an array of bytes and returns a bytearray object of the created array of the defined size by a particular iterable or a value. […]

Python Divmod() Function

How to use the Python divmod() function

In this article, we will be unveiling the working and use of Python divmod() function in detail. 1. Python divmod() function Python has an in-built divmod() function which performs division and modulus operation on the two input values. The divmod() function takes two values as arguments and performs division i.e. value1/value2 and modulus operation i.e. […]

3 Ways To Trim A Python String

3 ways to trim a String in Python

What do you mean by trimming a string and how can you trim a string in Python? When you remove the whitespace around strings of text, in technical terms we call it trimming a string. In this article, we’ll cover 3 methods to trim a string in Python. Technique 1: The strip() to Trim a […]

4 Ways To Check For The Equality Of Python Strings

String Equals Check in Python – 4 Easy Ways

In this article, we will be having a look at the different ways to perform a string equals check in Python. String comparison is basically the comparison of two strings i.e. it the procedure through which we check for the equality of strings by comparing the strings character-by-character. Technique 1: Python ‘==’ operator to check […]

Python Count() Function

How to Use the Python count() Function

Hi, Folks! In this article, we will be focusing on Python count() method with Strings and Lists. 1. Python count() function with Strings Python String has got an in-built function – string.count() method to count the occurrence of a character or a substring in the particular input string. The string.count() method accepts a character or […]

Ways To Copy A Python List

Ways to Copy a List in Python

In this article, we will be understanding various techniques to copy a list in Python. Python List is a data structure to store and manipulate the data values. Technique 1: The extend() method to copy a list in Python Python built-in extend() method can be used to copy the elements of a list to another […]