compair string with a list??

jubafre at brturbo.com jubafre at brturbo.com
Wed Aug 21 20:55:19 CEST 2002


	I open a file teste.asm in a list like that:

x=['\tLDA \tD1', '\tADD \tD2', '\tSTA \tD3', '\tHLT\t', '', 'D1:\tDB \t3', 'D2:\tDB \t2', 'D3:\tDB \t']

the nodes of the list means the lines of the file opened.

I want to compair one string with a part of line
for example 'LDA'==x[0], this not true because x[0] is all the node ('\tLDA \tD1'),
i want to compair 'LDA'== '\tLDA', how i can get this??????



     Juliano Freitas
www.gebrasil.hpg.com.br 


More information about the Python-list mailing list