title: How do I check the operating system in Python?
body: <p>I want to check the operating system (on the computer where the script runs).</p>
  
  <p>I know I can use <code>os.system('uname -o')</code> in Linux, but it gives me a message in the console, and I want to write to a variable.</p>
  
  <p>It will be okay if the script can tell if it is Mac, Windows or Linux. How can I check it? </p>