[Python] f string formatting not working as intended [duplicate]

Discussão em 'Python' iniciado por Stack, Novembro 22, 2024.

  1. Stack

    Stack Membro Participativo

    I'm fairly new to Python and need some advise,

    os.system(f"find {files_local} -type f -exec chmod 0644 {} \;")


    this line doesn't work because of the empty {}

    os.system(f"find {files_local} -type f -exec chmod 0644 {} \;")


    SyntaxError: f-string: valid expression required before '}'


    What work around I could use?

    Continue reading...

Compartilhe esta Página