I try to make a program that I was left with as a task in the university about how to execute terminal commands, from a programming language, I am trying with python, but when doing the following I get an error in the "find"
import subprocess
print("El archivo mas grande de la carpeta :", carpeta1, )
subprocess.call(['find', carpeta1, '-type', 'f', '-print', '|', 'sort', '-nr', '|', 'head', '-1'])
I get the following error: find: paths must precede expression: '|' I would appreciate someone helping me with this error.