HomePython

# Python

Showing 1 - 20 of 219 results

#### Python Program to Remove Duplicates from a Linked List

In this Python program, we will create a singly linked list and remove duplicate elements from it. A linked list...

#### Python Program to Solve the Celebrity Problem

This Python program solves the Celebrity Problem by finding a person who is known by everyone but does not know...

#### Python Program to Solve n-Queen Problem with Recursion

This Python program uses a recursive approach to solve the n-Queens problem. It explores all possible combinations of queen placements...

#### Python Program to Find Intersection and Union of Two Linked Lists

In this Python program, we will be implementing the intersection and union operations on two linked lists. Linked lists are...

#### Python Program to Search an Element in a Linked List using Recursion

In this Python program, we will implement a recursive approach to search for an element in a linked list. A...

#### Python Program to Print the Contents of File in Reverse Order

This Python program reads and prints the contents of a file in reverse order. Printing the contents of a file...

#### Python Program to Copy One File to Another File

This Python program is designed to copy the contents of one file to another file. It provides a simple and...

#### Python Program to Counts the Number of Times a Letter Appears in the Text File

This python program counts the occurrences of a specific letter in a text file. Problem statement This program begins with...

#### Python Program that Displays which Letters are in First String but not in Second

This python program compares two strings and displays the letters that are present in the first string but not in...

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

In this program, we will write a Python program to find the number that occurs an odd number of times...

#### Python Program to Count Number of Lowercase Characters in a String

This Python program counts the number of lowercase characters in a string. Problem Statement You are tasked with writing a...

#### Python Program Find the Length of Linked List using Recursion

In this Python program, we will use recursion to find the length of a linked list. A linked list is...

#### Python Program to Find the Sum of All Nodes in a Tree

This python program calculates the sum of all nodes in a binary tree. Binary trees are hierarchical data structures commonly...

#### Python Program to Perform Singly Linked List Operations

A singly linked list is a data structure that consists of a sequence of nodes, where each node stores an...

#### Python Program to Implement Doubly Linked List Operations

This python program demonstrates the implementation of various doubly linked list operations using a custom class in Python. Doubly linked...

#### Python Program to Count Number of Uppercase and Lowercase Letters in a String

This Python program counts the number of uppercase and lowercase letters in a string. Problem statement You are tasked with...

#### Python Program to Count the Number of Digits and Letters in a String

This Python program counts the number of digits and letters in a string. In many text processing applications, itâ€™s often...

#### Python Program to Detect Cycle in a Linked List

This Python program detects a cycle in a linked list using Floydâ€™s Cycle Detection Algorithm. In computer science, a linked...

#### Python Program to Print All Permutations of a String in Lexicographic Order using Recursion

In this Python program, we embark on an exploration of permutations and lexicographic ordering. We will employ the power of...

#### Python Program to Create a New String Made up of First and Last 2 Characters

This python program provides an introduction to the user, explaining what it does. It then prompts the user to enter...