Optimized number of permutations of mappings in heurisch()

This PR makes the "unnecesary_permutaion" aesthetically more comprehensive by using list comprehension instead of filter function. It also removes the "enter -> \n" after the starting of the for loop