[Python] Pathlib: how to remove first n characters of path.stem

Discussão em 'Python' iniciado por Stack, Março 28, 2025.

  1. Stack

    Stack Membro Participativo

    To the point: In a python script with YAML syntax I want to rename a file using:

    {created.year}-{created.month:02}-{created.day:02}_{path.stem}.jpg


    Would it be possible to remove the first n characters of path_stem? If so, how? Thank you!

    Continue reading...

Compartilhe esta Página