#Python pop quiz:

What does the following Python3 script output in a standard Linux environment?

import subprocess
print("a")
subprocess.run(["echo", "b"])
print("c")

Assume it is run as `python3 quiz.py | tr \n " "` to turn newlines into spaces.

Solution to Python pop quiz 

Show thread

re: Python quiz; snark 

Show thread
Follow

re: Python quiz; snark 

Sign in to participate in the conversation
Librem Social

Librem Social is an opt-in public network. Messages are shared under Creative Commons BY-SA 4.0 license terms. Policy.

Stay safe. Please abide by our code of conduct.

(Source code)

image/svg+xml Librem Chat image/svg+xml