python

python

Python program to find out the third largest number in a list

Python program to find out the third largest number in a list. The program will iterate through a list and find out the third largest number. The time complexity of this program is O(n).

Read
python

Python program to get random values from a list, dictionary, tuple or set

Python program to get random values from a list, dictionary, tuple or set with examples. We will learn how to find random elements by using the sample() method of random module.

Read
python

Different ways in python to remove vowels from a string

In this python program, we will learn how to remove all vowels from a string. Our program will take the string as input from the user and print out the modified string.

Read
python

write a python program to do a case insensitive string replacement

This python tutorial will show you how to do a case insensitive string replacement. We will create regex with ignore-case for the replacements.

Read
python

Python program to select an item randomly from a list

Learn how to select an item randomly from a list in python. We will learn how to select a random number and how to select a random string from a list of different values.

Read
python

Different ways to convert one boolean to string in python

Learn how to convert one boolean to string in python using different ways. In this post, I will show you three different methods by using format(), using %s and using str()

Read
python

How to ceil all values of an array using python numpy ceil

In this python tutorial, we will learn how to ceil all values of an array using python numpy ceil method with one example. You will learn how to use numpy method with this post.

Read
python

How to read the content of a specific column of csv file in Python

In this tutorial, we will learn how to read the contents of a specific column of a csv file in python. I will show you how to do that using the inbuilt csv module and using pandas.

Read
python

Python calendar module HTMLCalendar class

Python calendar module provides one HTMLCalendar class to get one HTML calendar. In this post, I will show you how to use the HTMLCalendar class with an example. It also provides different methods to get different types of HTML calendar results. This method is really useful if you want to get one calendar as a HTML.

Read
python

Python calendar yeardayscalendar explanation with examples

This method is defined in python calendar module. This is similar to yeardatescalendar() that we explained before. It returns one list of month rows. Each row contains width number of months that we pass as the second argument. The default value is 3. Each month contains between 4 to 6 weeks and each week contains 1 to 7 days. All entries of the dates are numbers. All days outside the month are zero.

Read