def printComparison ( results , class_or_prop ) : data = [ ] Row = namedtuple ( 'Row' , [ class_or_prop , 'VALIDATED' ] ) for k , v in sorted ( results . items ( ) , key = lambda x : x [ 1 ] ) : data += [ Row ( k , str ( v ) ) ] pprinttable ( data )
to print the results in the form of table in python
print ( out the results of the comparison using a nice table )
def printComparison(results, class_or_prop):
	"""
	print(out the results of the comparison using a nice table)
	"""

	data = []

	Row = namedtuple('Row',[class_or_prop,'VALIDATED'])

	for k,v in sorted(results.items(), key=lambda x: x[1]):
		data += [Row(k, str(v))]

	pprinttable(data)