## Python program to find the maximum and minimum element in a list

Python program to find the maximum and minimum element in a list : In this tutorial, we will learn how to find the maximum and minimum number in a python list. All the numbers will be entered by the user. First, we will ask the user the total number he wants to enter. Then using […]

## How to copy or clone a list in python

How to copy or clone a list in python : In this tutorial, we will learn how to copy or clone a list in python. After python 3.3, one new inbuilt method was added to copy a list. We will see two different processes to copy a list in python. Method 1 can be used […]

## Python program to replace character in a string with a symbol

Python program to replace all occurence of a character with a symbol in a string : In this tutorial, we will learn how to replace all occurence of a character with a different symbol. First we will take all the inputs from user : String, character to replace and the symbol. To replace , we […]

## Python program to print a right angle triangle

Python 3 program to print a right angle triangle : In this tutorial, we will learn how to print a right angle triangle using python 3. The output will look like as below : 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 […]

## Python time.sleep method explanation with Example

How to sleep in python using time.sleep() method : In python, we have one method to pause the execution of a program : ‘sleep()’. This method is available in ‘time’ module. In this tutorial, we will learn how to pause a program for a specific time interval using sleep. Syntax of Python time.sleep() : time.sleep(secs) […]

## Python program to remove characters from odd or even index of a string

Python 3 program to remove characters from odd or even index from a string : In this example, we will write one program in Python 3 to remove all characters positioned on Even or Odd . We will ask the user if he wants to remove odd or even indexed characters. Following algorithm we are […]

## Python program to find the sum of all values of a dictionary

Python program to find the sum of all the values of a dictionary : In this tutorial, we will learn how to find the sum of all the values of a dictionary in python. Algorithm of the program is as below : Algorithm : 1. Create one dictionary with some key-value pairs. Alternatively, we can […]

## Python program to sort values of one list using second list

Python program to sort one list by using values of different list : In this example program, we will learn how to sort elements of one list by using elements of a different list. Let’s take a look into the program : Python Program : first_list = [“O”,”X”,”A”,”C”,”D”,”K”] second_list = [‘1′,’2′,’3′,’4′,’5′,’6’] zipped_pairs = zip(first_list,second_list) sorted_pairs […]

## Python program to check if a year is leap year or not

Python 3 program to check if a year is leap year or not : To check if a year is leap year or not, we need to check if it is divisible by 4 or not. A year is leap year if it is divisible by 4 and for century years, if it also divisible […]

## Python program to find the largest even and odd numbers in a list

Write a Python Program to print largest Even and Odd numbers in a list : In this tutorial, we will write one python 3 program to find out the largest odd and even number in a list. User will enter all the numbers to store in the list. Next we will run one loop to […]