Power Set by twobit

a=[]
exec'R=range(2**len(a));a=[[a[j]for j in R if 2**j&i]or 0for i in R];'*input()
print`a`.replace(*"[{").replace(*"]}")

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page