Shi Mu wrote:
> How to run a function to make [1,2,4] become [[1,2],1,4],[2,4]]?
> Thanks!

 From what I gather try:

a = [1,2,4]
n = list()
for i in a:
     index = a.index(i) + 1
     for x in a[index:]:
         n.append([i, x])
print n

more elegant ways to do this, but its a start.
hope this helps.

Adonis
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to