def print_course(course):
 print course.id
 print 'num type name'
 for (index, item) in enumerate(course.tabs):
  print (index + 1), (('"' + item.get('type')) + '"'), (('"' + item.get('name', '')) + '"')

def print_course ( course ) : print course . id print 'num type name' for ( index , item ) in enumerate ( course . tabs ) : print ( index + 1 ) , ( ( '"' + item . get ( 'type' ) ) + '"' ) , ( ( '"' + item . get ( 'name' , '' ) ) + '"' )
prints out the course id and a numbered list of tabs .