This code ...
print( "PO #{}".format('PUR-ORD-2021-00001'.lstrip('PUR-ORD-2021-')))
print( "PO #{}".format('PUR-ORD-2021-00002'.lstrip('PUR-ORD-2021-')))
print( "PO #{}".format('PUR-ORD-2021-00003'.lstrip('PUR-ORD-2021-')))
print( "PO #{}".format('PUR-ORD-2021-00008'.lstrip('PUR-ORD-2021-')))
print( "PO #{}".format('PUR-ORD-2021-00018'.lstrip('PUR-ORD-2021-')))
... returns:
PO #
PO #
PO #3
PO #8
PO #8
I'm no Python expert, but in my experience so far Python's results are always eminently sensible. But this? I can't make sense of it at all.
What's going on here?
Version:
me@mine:~$ python
Python 3.8.10 (default, Jun 2 2021, 10:49:15)
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>