/
Regards
Adam Przybyla
--
http://mail.python.org/mailman/listinfo/python-list
le, but
> it's a construct that I use practically on a daily basis. To someone
> who's not familiar with Python, list comps could suffer from the same
> issues - what does THIS do? oh.
list_ptr=list_a
list_ptr=list_ptr[1:]
Regards
Adam Przybyla
--
http://mail.python.org/mailman/listinfo/python-list
ace/code and get 9.
>
> Thanks for your feedback.
... try this: http://pypi.python.org/pypi/pymatlab
Regards
Adam Przybyla
--
http://mail.python.org/mailman/listinfo/python-list
in days_off]):
>doSomething
>
> Is there a better pythonic idiom for this situation?
... hmmm, try this:
if set(['monday', 'tuesday'])&set(days_off):
dosomething
Regards
Adam Przybyla
--
http://mail.python.org/mailman/listinfo/python-list
n x(): print k,
...
0 1 2 3 4 5 6 7 8 9
>>> for k in x(): print k,
...
0 1 2 3 4 5 6 7 8 9
>>> yield_all=[k for k in x()]
>>> yield_all
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
>>>
Regards
Adam Przybyla
--
http://mail.python.org/mailman/listinfo/python-list
.append(n)
>
> return collapsed
>
> Is there an elegant way to do this, or should I just stick with the code
> above?
>>> p=[1,1,1,1,1,4,4,4,8,8,9]
>>> filter(lambda y: y>0, map(lambda x,y: x==y and -1 or x,[0]+p,p+[0]))
[1, 4, 8, 9]
>>>
Z