title: Python script to list users and groups
body: <p>I'm attempting to code a script that outputs each user and their group on their own line like so:</p>
  
  <pre><code>user1 group1  
  user2 group1  
  user3 group2  
  ...  
  user10 group6
  </code></pre>
  
  <p>etc.  </p>
  
  <p>I'm writing up a script in python for this but was wondering how SO might do this.</p>
  
  <p>p.s. Take a whack at it in any language but I'd prefer python.</p>
  
  <p>EDIT: I'm working on Linux. Ubuntu 8.10 or CentOS =)</p>