Python - I'm trying to get the output of pwd and instead i get the exit status
<p>I'm trying to get the output of <code>pwd</code>:</p>

<pre><code>#!python
import os
pwd = os.system("pwd")
print (pwd)
</code></pre>

<p>it prints 0 which is the successful exit status instead the path.
How can i get the path instead?</p>
