[EMAIL PROTECTED] wrote: > I end up with a single list, but with two brackets on each end, > for example, [[3.5, 4.5, 5.5, 6.5, 7.5]]. > > Unfortunately, when I try to use that last list in a NumPy > function, I'm > told that it cannot be broadcast to the correct shape. So, what I > want to do is strip the extra brackes from each end to leave just > [3.5, 4.5, 5.5, 6.5, 7.5]. > > How do I do this, please?
Easy :) I'll show you by example: >>> ham = [[1,2,3],[4,5,6]] >>> ham [[1, 2, 3], [4, 5, 6]] >>> ham[0] [1, 2, 3] >>> ham.remove([4,5,6]) >>> ham[0] [1, 2, 3] >>> ham [[1, 2, 3]] >>> HTH&Regards, Björn -- BOFH excuse #453: Spider infestation in warm case parts -- http://mail.python.org/mailman/listinfo/python-list