Is there any efficient way to select the last characters of a string file Name until there's a Slash / in Python?
For example, I got the following file Name:
File=r"C:\Users\folder1\folder2\folder3/fileIwanttoget.txt"
I would like to select only the string:
string=fileIwanttoget.txt
Independently of the number of characters that this file name has.