(examples using python 3.8 on Ubuntu Linux 20.4 64Bit):
>>> a="/get/todo.dat"
>>> b="/get/"
>>> a.lstrip(b)
'odo.dat'
expected:
'todo.dat'
even worse:
expected answer in each case:
'0018.dat'
# first test of lstrip()
>>> name='data/rwl3_v001_Data0018.dat'
>>> mask='data/rwl3_v001_Data'
>>> name.lstrip(mask)
'8.dat'
# strip() should return the same answer:
>>> name.strip(mask)
'8.'
while '/t' might be misinterpreted maybe as tab '\t' (?) the second example puzzles me even more.
Any Ideas what happens? Help appreciated. Of course I could write a function, but is there something to know about strings and strip?