Wednesday, 15 September 2010

html - Python - replace word with another -



html - Python - replace word with another -

i have html table 12 cells. each cell has word replaced. of words identical. have list 12 elements. each element word. need replace each word appropriate word list. first word replaced first element, sec second element , on. can give me illustration how this, i'm new @ python?

words = ['fist','second','thrid'] word in words: yourtext = yourtext.replace('theoldword',word,1)

python html file replace html-table

No comments:

Post a Comment