Hafeezul Kareem has Published 257 Articles

Data analysis and Visualization with Python program

Hafeezul Kareem

Hafeezul Kareem

Updated on 01-Nov-2019 07:58:30

436 Views

In this tutorial, we are going to learn about data analysis and visualization using modules like pandas and matplotlib in Python. Python is an excellent fit for the data analysis things. Install the modules pandas and matplotlib using the following commands.pip install pandaspip install matplotlibYou will get a success message ... Read More

Program to reverse an array up to a given position in Python

Hafeezul Kareem

Hafeezul Kareem

Updated on 27-Aug-2019 13:02:36

897 Views

In this tutorial, we will learn how to reverse an array upto a given position. Let's see the problem statement.We have an array of integers and a number n. Our goal is to reverse the elements of the array from the 0th index to (n-1)th index. For example, Input array ... Read More

Python program to remove leading zeros from an IP address

Hafeezul Kareem

Hafeezul Kareem

Updated on 27-Aug-2019 12:52:36

613 Views

In this tutorial, we are going to write a program which removes leading zeros from the Ip address. Let's see what is exactly is. Let's say we have an IP address 255.001.040.001, then we have to convert it into 255.1.40.1. Follow the below procedure to write the program.Initialize the IP address.Split ... Read More

Python program to merge two Dictionaries

Hafeezul Kareem

Hafeezul Kareem

Updated on 27-Aug-2019 12:48:32

725 Views

In this tutorial, we are going to learn how to combine two dictionaries in Python. Let's see some ways to merge two dictionaries.update() methodFirst, we will see the inbuilt method of dictionary update() to merge. The update() method returns None object and combines two dictionaries into one. Let's see the ... Read More

Python program to find all close matches of input string from a list

Hafeezul Kareem

Hafeezul Kareem

Updated on 27-Aug-2019 12:23:17

695 Views

In this tutorial, we are going to find a solution to a problem. Let's see what the problem is. We have a list of strings and an element. We have to find strings from a list in which they must closely match to the given element. See the example.Inputs strings ... Read More

Program to check if all the values in a list that are greater than a given value in Python

Hafeezul Kareem

Hafeezul Kareem

Updated on 27-Aug-2019 12:12:11

1K+ Views

In this tutorial, we will check whether all the elements in a list are greater than a number or not. For example, we have a list [1, 2, 3, 4, 5] and a number 0. If every value in the list is greater than the given value then, we return True else False.It's ... Read More

Custom len() Function In Python

Hafeezul Kareem

Hafeezul Kareem

Updated on 30-Jul-2019 22:30:26

842 Views

Let's see how can we implement custom len() function in Python. Try it by yourself first using the following steps.StepsGet the iterator from the user string/list/tuple.Define a function with a custom name as you like and invoke it by passing the iterator.Initialize the count to 0.Run a loop until it ... Read More

Advertisements