[ILUG] Python strip "]" from string

ollie at eillo.org ollie at eillo.org
Tue Oct 7 17:56:01 IST 2008


Hello,
      For some reason Python refuses to strip a square bracket from a string:

string = "[test]"


string.strip("[")      works fine
string.strip("]")      refuses to work


If i do a test in IDLE it works fine!

I must be missing something.


Thanks,
       Oliver.




More information about the ILUG mailing list