def term_to_integer(term):
 return int(''.join(list(map(str, list(term)))), 2)

def term_to_integer ( term ) : return int ( '' . join ( list ( map ( str , list ( term ) ) ) ) , 2 )
return an integer corresponding to the base-2 digits given by term .