Skip to content

Tag Archives: python-set

Given a binary string S, the task is to print all distinct decimal numbers that can be obtained by generating all permutations of the binary… Read More
Given two positive integers A and B, the task is to print the distinct digits in descending order, which are not common in the two… Read More
Given a string S consisting of lowercase English alphabets, the task is to find the number of unique characters present in the string. Examples: Input:… Read More
Lists: are just like dynamic sized arrays, declared in other languages (vector in C++ and ArrayList in Java). Lists need not be homogeneous always which… Read More
In this article, we will discuss how to convert a set to a string in Python. It can done using two ways – Method 1:… Read More
Following article mainly discusses operators used in Sets and  Dictionaries. Operators help to combine the existing value to larger syntactic expressions by using various keywords… Read More
We can convert a string to setin Python using the set() function. Syntax : set(iterable) Parameters : Any iterable sequence like list, tuple or dictionary.… Read More
List: Lists are just like dynamic sized arrays, declared in other languages (vector in C++ and ArrayList in Java). Lists need not be homogeneous always… Read More
In Python, a Set is a collection data type that is unordered and mutable. A set cannot have duplicate elements. Here, the task is to… Read More
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
The frozenset() is an inbuilt function is Python which takes an iterable object as input and makes them immutable. Simply it freezes the iterable objects… Read More
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
Comprehensions in Python provide us with a short and concise way to construct new sequences (such as lists, set, dictionary etc.) using sequences which have… Read More
Set, a term in mathematics for a sequence consisting of distinct language is also extended in its language by Python and can easily be made… Read More
Given N objects numbered from 1 to N out of which all are of the same weights except only one object which is not known… Read More