#NEWLINE# def has_valid_checksum( self , value ) : #NEWLINE# #INDENT# '\n        This method checks if the last letter/digit in value is valid\n        according to the algorithm the ID Card follows.\n        ' #NEWLINE# if ( len ( value ) != 18 ) : #NEWLINE# #INDENT# return True #NEWLINE# #UNINDENT# checksum_index = ( sum ( map ( ( lambda a , b : ( a * ( ord ( b ) - ord ( '0' ) ) ) ) , ( 7 , 9 , 10 , 5 , 8 , 4 , 2 , 1 , 6 , 3 , 7 , 9 , 10 , 5 , 8 , 4 , 2 ) , checksum_index [ : 17 ] ) ) % 11 ) #NEWLINE# return ( '10X98765432' [ checksum_index ] == value [ ( - 1 ) ] )