l=[1,2,3,4]
n=2**len(l)
ssa=[] #sub sequenc earray
print(ssa)
for i in range(1,n):
ssa=[]
pos=0 #index of list
while i!=0:
if i&1==1:
ssa.append(l[pos])
pos=pos+1
i=i>>1
else:
i=i>>1
pos=pos+1
print(ssa)
To embed this project on your website, copy the following code and paste it into your website's HTML: