Skip to content

Category Archives: Python Programs

Given a set and list, the task is to write a python program to check if any set element exists in the list. Examples: Input… Read More
Given two lists, the task is to write a Python program to extract the first element that occurs in list 1 from list 2. Examples:… Read More
Given two Dictionaries, the task is to write a Python program to get the symmetric difference. Examples: Input : test_dict1 = {‘Gfg’ : 4, ‘is’… Read More
In this article given a Strings List, the task is to write a Python program to pad each string with spaces with specified leading and… Read More
Given an even integer input, the task is to write a Python program to print a heart using loops and mathematical formulations. Example : For… Read More
Given a list and an index, the task is to write a Python program to first select the element at that index as the pivot… Read More
Given an array arr[], the task is to combine all the elements in the array sequentially and check if it is a palindrome. Examples: Input:… Read More
Given a string S of lowercase English alphabets, the task is to print the smallest word in the given string. Examples: Input: S = “sky… Read More
Given a list, the task is to write a python program to cube all the list elements. Input: [1, 2, 3, 4] Output: [1, 8,… Read More
Given a string S consisting of lowercase English alphabets, the task is to print the longest word present in the given string in python. Examples:… Read More
Given a string, the task is to write a Python program to print the last word in that string. Examples: Input: sky is blue in… Read More
Given a list of binary tuples, the task is to write a Python program to remove all tuples that are duplicates irrespective of order, i.e… Read More
Given multiple sets list, the task is to write a Python program to find union of each set. Examples: Input : test_list = [{4, 3,… Read More
Given two strings, the task here is to write a python program that can test if they are almost similar. Similarity of strings is being… Read More
Given dictionary with mixed data types as values, the task is to write a Python program to convert to parsed strings by different delims. Examples:… Read More