## Python Program to Find the Number Occurring Odd Number of Times in a List

This is a Python program to find the element that occurs odd number of times in a list. Problem Description A list is given in which all elements except one element occurs an even number of times. The problem is to find the element that occurs an odd number of times. Problem Solution 1. The … Read more

## Python Program to Find the Length of a List using Recursion

This is a Python Program to find the length of a list recursively. Problem Description The program takes a list and finds the length of the list recursively. Problem Solution 1. Define a recursive function which takes a list as the argument. 2. Initialize a variable to a list. 3. In the function, put the … Read more

## Python Program to Find the Intersection of Two Lists

This is a Python Program to find the intersection of two lists. Problem Description The program takes two lists and finds the intersection of the two lists. Problem Solution 1. Define a function that accepts two lists and returns the intersection of them. 2. Declare two empty lists and initialize them to an empty list. … Read more

## Python Program to Flatten a List without using Recursion

This is a Python Program to flatten a nested list without using recursion. Problem Description The program takes a nested list and flattens the nested list without using recursion. Problem Solution 1. A variable must be initialized with a nested list. 2. Use a lambda function and map() to map the flatten function to each … Read more

## Python Program to Find the Total Sum of a Nested List Using Recursion

This is a Python Program to find the total sum of a nested list using recursion. Problem Description The program takes a nested list and finds the total sum of the nested list using recursion. Problem Solution 1. Initialize a variable to a nested list. 2. Pass the list as an argument to a recursive … Read more

## Python Program to Flatten a Nested List using Recursion

This is a Python Program to flatten a nested list using recursion. Problem Description The program takes a nested list and flattens it using recursion. Problem Solution 1. Initialize a variable to a nested list. 2. Pass the list as an argument to a recursive function to flatten the list. 3. In the function, if … Read more

## Python Program to Find the Sum of Elements in a List using Recursion

This is a Python Program to find the sum of elements in a list recursively. Problem Description The program takes a list and finds the sum of elements in a list recursively. Problem Solution 1. Define a recursive function which takes an array and the size of the array as arguments. 2. Declare an empty … Read more

## Python Program to Return the Length of the Longest Word from the List of Words

This is a Python Program to read a list of words and return the length of the longest one. Problem Description The program takes a list of words and returns the word with the longest length. Problem Solution 1. Take the number of elements in the list and store it in a variable. 2. Accept … Read more

## Python Program to Remove the ith Occurrence of the Given Word in a List

This is a Python Program to remove the ith occurrence of the given word in list where words can repeat. Problem Description The program takes a list and removes the ith occurrence of the given word in the list where words can repeat. Problem Solution 1. Take the number of elements in the list and … Read more 