serach in list, again??

jubafre at jubafre at
Mon Aug 19 21:21:49 CEST 2002

ok the first step i understod, i want to get the next one to the ":" position

x=['LDA', 'D1', 'ADD', 'D2', 'STA', 'D3', 'HLT', 'D1:', 'DB', '3', 'D2:', 'DB', '2', 'D3:', 'DB', '0']

filtered_list = [el for el in arqui if el.find(":") >= 0]
print filtered_list 
['D1:', 'D2:', 'D3:']

 i have the DB after D1: and the others labels
	Juliano Freitas 

More information about the Python-list mailing list