[issue4054] str.split unintentionally strips char 'I' from the string

2008-10-06 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: It's not a bug. Please read the documentation of the split() method: http://docs.python.org/library/stdtypes.html#str.split If you want to get the value after "=", use: value = line.split("FILE=", 1)[1] or: value = line[len('FILE='):

[issue4054] str.split unintentionally strips char 'I' from the string

2008-10-06 Thread Govind
New submission from Govind <[EMAIL PROTECTED]>: I tried to process a text file (with UTF-8 encoding) which has contents like this: FILE=India asbds FILE=Indonasia ssgsds FILE=Africa DBGDGDFG When I use the below code: >>> f = open("e:\\temp\\file.txt", 'r') >>> lines = f.readlines() >>> for l