How to test characters of a string

Dave dave at looktowindward.com
Tue Jun 7 15:35:43 EDT 2022


Hi,

I’m new to Python and have a simple problem that I can’t seem to find the answer.

I want to test the first two characters of a string to check if the are numeric (00 to 99) and if so remove the fist three chars from the string. 

Example: if “05 Trinket” I want “Trinket”, but “Trinket” I still want “Trinket”. I can’t for the life of work out how to do it in Python?

All the Best
Dave



More information about the Python-list mailing list