lbolla <lbo...@gmail.com> writes:
> for k, g in groupby(clean_up(data) , key=lambda s: s.startswith('VLAN')):
>       if k:
>               key = list(g)[0].replace('VLAN','')

This is the nicest solution, I think.  Mine was more cumbersome.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to