I ran into what I think is a bug, and I'm looking for confirmation or that I am not understanding how this method works.
Here's my basic output:
(Pdb) x = 'KEY_K'
(Pdb) x.lstrip('K')
'EY_K'
(Pdb) x.lstrip('KE')
'Y_K'
(Pdb) x.lstrip('KEY')
'_K'
(Pdb) x.lstrip('KEY_')
''
(Pdb) import sys
(Pdb) sys.version
'2.7.11 (default, Dec 5 2015, 14:44:47) \n[GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.1.76)]'
My understanding is that the final 'lstrip' in that example should have returned 'K', but it did not. Does anyone know why?