text: Print bitwise AND set of a number N | function to find bitwise subsets Efficient approach ; Driver Code
code: def printSubsets ( n ) : NEW_LINE INDENT i = n NEW_LINE while ( i != 0 ) : NEW_LINE INDENT print ( i , end = " ▁ " ) NEW_LINE i = ( i - 1 ) & n NEW_LINE DEDENT print ( "0" ) NEW_LINE DEDENT n = 9 NEW_LINE printSubsets ( n ) NEW_LINE