[python] add string permutations