title: Join the every two lines from output with space delimiter and format the output in python3
body: <p>I have created a script to pull the data from Directory manger LDAP  <code>ldapsearch</code> command to get the <code>user</code> and <code>user manger name</code> for some validation. as a newbie learner i have written below code in python3 which yeilds the data, basically user and user manager's name:</p>
  
  <pre><code>#!/usr/bin/python3
  ##  script Name: getUserinfo.py
  import subprocess
  from subprocess import call
  
  # Authentication
  '''ldap_dn = "cn=directory manager"
  ldap_pwd = ""
  ldap_server = "its3.rraka.com"
  ldap_base = "ou=people,o=rraka.com"
  ldap_user_file = "uid.txt"' '''
  
  def CheckID(user):
    call("ldapsearch -h server1 -D 'cn=directory manager' -w mypass123 -LLLb 'ou=people,o=rraka.com' managerlogin uid=" + user , shell=True)
  
  def UidCheck():
    with open( '/home/karn/uid.txt', mode='rt', encoding='utf-8' ) as f:
      for line in f.readlines() :
        return CheckID(line)
  
  if __name__ == '__main__':
      UidCheck()
  </code></pre>
  
  <p>My above script returns the results as below which is good data what i want, but need to parse this data to be more readable, like to print user and User manager.</p>
  
  <pre><code># ./getUserinfo.py
  
  dn: uid=cecile,ou=people,o=rraka.com
  managerlogin: simonk
  
  dn: uid=richardb,ou=people,o=rraka.com
  managerlogin: hxl
  
  dn: uid=wwoo,ou=people,o=rraka.com
  managerlogin: mstanton
  
  dn: uid=ski,ou=people,o=rraka.com
      managerlogin: fkahn
  
  ------------ further ouput turnicated deliberately ----------
  </code></pre>
  
  <blockquote>
    <p>Expected ouput would be:</p>
  </blockquote>
  
  <pre><code>User ID         Manger ID
  --------------------------------
  cecile          simonk
  richardb        hxl
  </code></pre>