I use google clould storage api. I get the filename like this 'pdf/randomPdf.pdf'
I use
new_filename = Path(file_name).stem + ".txt"
I do this so I can change the name of the extension to .txt
Now I want to change the 'pdf/...' to 'text/...'
How I can do it without split?