Skip to content
Advertisement

How to remove the left part of a string?

I have some simple python code that searches files for a string e.g. path=c:path, where the c:path part may vary. The current code is:

JavaScript

What is a simple way to get the text after Path=?

Advertisement

Answer

Starting in Python 3.9, you can use removeprefix:

JavaScript
Advertisement