For calling an external command in Python you should look at the subprocess module in the standard library see the code below:-
import subprocess
subprocess.run(["ls", "-l"])
To know more about this you can have a look at the following video tutorial:-