I've trying to run the following script to check the available GPUs, however it doesn't run for two commands. If I run the command together it runs properly but not separately. I need to run separately as I have multiple GPUs and need to loop over them. Please tell me what am I doing wrong. I have tried many different approaches.
result= subprocess.run&(["ssh {}{}".format(user,server),"nvidia-smi"],shell=True)
When I run it says ssh is not recognized as an internal or external command.