campair and replace in a list?????/
jubafre at brturbo.com
jubafre at brturbo.com
Thu Aug 29 15:02:59 EDT 2002
I have this file .asm
LDA D1
ADD D2
STA D3
HLT
D1: DB 3
D2: DB 2
D3: DB 0
I opened the file .asm and put in a string like that, wich node is a file line.
x=['\tLDA \tD1', '\tADD \tD2', '\tSTA \tD3', '\tHLT\t', 'D1:\tDB \t3', 'D2:\tDB \t2', 'D3:\tDB \t0']
I have a tuple
cod=(( 'LDA' , '2' , '30' ))
how i can replace in x, the LDA for example with a value of the tuple??
for example:
x=['\t30 \tD1',...]
Juliano Freitas
www.gebrasil.hpg.com.br
More information about the Python-list
mailing list