I was able to run it in an interactive Python shell without the shell keyword and both commands returned the expected output.