How To Loop A Command In Python