# Tag Archives: Python set-programs

## Find the size of a Set in Python

A Set is an unordered collection data type that is iterable, mutable, and has no duplicate elements. Python’s set class represents the mathematical notion of… Read More »

## Python program to get all subsets of given size of a set

Given a set, write a Python program to generate all possible subset of size n of given set within a list. Examples: Input : {1,… Read More »

## Python | Convert set into a list

Given a set, write a Python program to convert the given set into list. Examples: Input : {1, 2, 3, 4} Output : [1, 2,… Read More »

## Iterate over a set in Python

In Python, Set is an unordered collection of data type that is iterable, mutable and has no duplicate elements. There are numerous ways that can… Read More »

## Python program to find common elements in three lists using sets

Prerequisite : Sets in Python Given three arrays, we have to find common elements in three sorted lists using sets. Examples : Input : ar1… Read More »

## Python | Find missing and additional values in two lists

Given two lists, find the missing and additional values in both the lists. Examples: Input : list1 = [1, 2, 3, 4, 5, 6] list2… Read More »

## Python | Minimum number of subsets with distinct elements using Counter

You are given an array of n-element. You have to make subsets from the array such that no subset contain duplicate elements. Find out minimum… Read More »

## Python | Check if two lists have at-least one element common

Given two lists a, b. Check if two lists have at least one element common in them. Examples: Input : a = [1, 2, 3,… Read More »

## Python program to count number of vowels using sets in given string

Given a string, count the number of vowels present in given string using Sets. Prerequisite: Sets in Python Examples: Input : GeeksforGeeks Output : No.… Read More »

## Concatenated string with uncommon characters in Python

Two strings are given and you have to modify 1st string such that all the common characters of the 2nd strings have to be removed… Read More »