I have a file path as a string and trying to remove the last '/' from the end.
my_file_path = '/home/ro/A_Python_Scripts/flask-auto/myDirectory/scarlett Johanson/1448543562.17.jpg/'
I've been trying it with regex but it just keeps removing all the '/'. Is there any easier way to just remove the last character without regex?
The easiest is
as @greggo pointed out
string="mystring";
string[:-1]