use iperf in python script

Hi everyone,
I want to write a python scipt that could use this two commands on Transiver BBB (Client) and receiver BBB (Server) :

sudo iperf -c -u -b 400k -l 800 -p 10001 -t 100
sudo iperf -u -l 800 -s -i3 -B -p 10001

Could I use directly iperf the command in the python script or I should convert it to some other code?