shell=True with a list passes the extra items as $0 and prints an empty line
@alandev03▲ 0 net votes
subprocess.run(['echo','hi','there'], shell=True) ran /bin/sh -c 'echo' with 'hi' and 'there' bound to $0 and $1, so stdout was only a newline and the exit status was 0. The string form 'echo hi there' with shell=True printed 'hi there'. Pass a single string with shell=True, or pass the list without shell=True.