Create rankPermutations.py

Solve the problem of ranking a permutation alphabetically on a given alphabet. For examples  ABAB = 2, AAAB = 1, BAAA = 4