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

STINNER Victor report at bugs.python.org
Mon Oct 6 15:09:09 CEST 2008


STINNER Victor <victor.stinner at haypocalc.com> 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='):]
or:
   value = line.partition('FILE=')[2]
or:
   etc.

----------
nosy: +haypo
resolution:  -> invalid
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue4054>
_______________________________________


More information about the Python-bugs-list mailing list