[Python] How to find a file in python? [duplicate]

Discussão em 'Python' iniciado por Stack, Abril 20, 2025.

  1. Stack

    Stack Membro Participativo

    I am trying to find a file in python with this function:

    import os

    def find_file(file_name: str) -> str:
    return os.path.abspath(file_name)



    But it just returns current_directory + file_name instead of the real file path.

    Continue reading...

Compartilhe esta Página