If n is the number of elements in the set then No. of subsets possible for this subset is 2^n (2 raise to the power n). {1,2} n=2 subsets =2^2 =4 = ϕ, {1}, {2},{1,2} every set is a subset of itself i.e. A General Note: Formula for the Number of Subsets of a Set A set containing n distinct objects has [latex]{2}^{n}[/latex] subsets. As each element has two possibilities (present or absent}, possible subsets are 2×2×2.. n … Ex. A set X of n elements has 2^n subsets, and the set consisting of these subsets (namely its power set P(X)), has 2^2^n subsets in all. # List of strings listOfElems = ['Hello', 'Ok', 'is', 'Ok', 'test', 'this Count elements in a flat list Suppose we have a list i.e. Number of Elements in Power Set For a given set S with n elements, number of elements in P(S) is 2^n. In this article we will discuss different ways to count number of elements in a flat list, lists of lists or nested lists. [math]\quad|\mathcal P(S\times S)|=2^{|S|^2}[/math] A relation on a set, [math]S[/math], is a subset of [math]S\times S[/math]. {1,2} and ϕ is a subset The total number of such relations is the cardinality of the power set, [math]\mathcal P(S\times S Let S be the set of all integers from 100 to 999 which are neither divisible by 3 nor divisible by 5.