Learn how to execute shell commands in Python and capture output as a string. Complete guide with code examples for subprocess.run(), error handling, and real-time output capture.