title: iteration over 2d list in python and printing headings for each element
body: <p>I am trying to work out how to iterate over a list and print out each item with a print statement describing what element is. my project is to create a user management system and print out something similar to the image I have attached.</p>
  <p><a href="https://i.stack.imgur.com/vWWEX.png" rel="nofollow noreferrer">The output I am trying to produce</a></p>
  <p><a href="https://i.stack.imgur.com/A6nQR.png" rel="nofollow noreferrer">The output I am getting</a></p>
  <p>My code:</p>
  <pre><code>records = 0
  userFirst = [&quot;John&quot;]
  userLast = [&quot;Doe&quot;]
  autoUsername = [&quot;Johndoe91&quot;]
  autoPassword = [&quot;123456789&quot;]
  hiddenPassword = [&quot;*****789&quot;]
  userRole = [&quot;User&quot;]
  userDept = [&quot;Administration&quot;]
  users = []  
  confidentialUserDetails = []  
  
  users.append(userFirst + userLast + userRole + userDept + autoUsername + autoPassword)
  confidentialUserDetails.append(users)
  
  for row in range(len(confidentialUserDetails)):
      records += 1
      print(&quot;-&quot; * 25)
      print(&quot;Record: &quot;, records)
      for col in range(len(confidentialUserDetails[row])):
          print(confidentialUserDetails[row][col])
  </code></pre>
  <p>Any help would be greatly appreciated. :)</p>