I ran into what I believe is a bug, and I'm searching for affirmation or that I am not arrangement how this method functions.
Here's my essential 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 understaning is that the last 'lstrip' in that model ought to have returned 'K', however it didn't. Does anybody know why?