text formatting question

idy idhayham at gmail.com
Fri Mar 1 01:49:44 EST 2013


I have a text string of this format 

Error = 'XYC.12345455LOcation/user/data/MYGLE-INGXYC.23344566LOcation/user/data/INGE-FTYXYC.22334566LOcation/user/data/GETN-YUNXYC.12345455LOcation/user/data/MYGLE-INGXYC.1111111LOcation/user/data/INGE-FTYXYC.3333333LOcation/user/data/GETN-YUN'

I need to write this to mail body as with following format in multiple lines

XYC.12345455-LOcation/user/data/MYGLE-ING
XYC.23344566-LOcation/user/data/INGE-FTY
XYC.22334566LOcation/user/data/GETN-YUN
XYC.12345455LOcation/user/data/MYGLE-ING
XYC.1111111LOcation/user/data/INGE-FTY
XYC.3333333LOcation/user/data/GETN-YUN

Note (XYC is common for all the text , rest of the fields are not constant. Please help



More information about the Python-list mailing list