leveinshtein.py
def print_matrix(matrix,source,target):
	"""
	Print source matrix for visual representation
	"""
	print(u"\t (s)\u2192 \t",end='')
	for c in target:
		print("%2s\t"%c,end='')
	print()
	for x in range(0,len(matrix)):
		if(x==0):
			print(u"(t)\u2193 \t",end='')
		else:
			print("%2s\t"%source[x-1],end='')
		for y in range(0,len(matrix[0])):
			#print("%2d (%d,%d)\t"%(matrix[x][y],x,y),end='')
			print("%2d \t"%(matrix[x][y]),end='')
		print("")

	Print source matrix for visual representation
	
Print source matrix for visual representation
Print source matrix for visual representation
def print_matrix(matrix,source,target):
	print(u"\t (s)\u2192 \t",end='')
	for c in target:
		print("%2s\t"%c,end='')
	print()
	for x in range(0,len(matrix)):
		if(x==0):
			print(u"(t)\u2193 \t",end='')
		else:
			print("%2s\t"%source[x-1],end='')
		for y in range(0,len(matrix[0])):
			print("%2d \t"%(matrix[x][y]),end='')
		print("")
def print_matrix ( matrix , source , target ) : print ( u"\t (s)\u2192 \t" , end = '' ) for c in target : print ( "%2s\t" % c , end = '' ) print ( ) for x in range ( 0 , len ( matrix ) ) : if ( x == 0 ) : print ( u"(t)\u2193 \t" , end = '' ) else : print ( "%2s\t" % source [ x - 1 ] , end = '' ) for y in range ( 0 , len ( matrix [ 0 ] ) ) : print ( "%2d \t" % ( matrix [ x ] [ y ] ) , end = '' ) print ( "" )
Print source matrix for visual representation
Print source matrix for visual representation
"""
	Print source matrix for visual representation
	""" #print("%2d (%d,%d)\t"%(matrix[x][y],x,y),end='')

matrix
source
target