Permutation in String - Leetcode 567 - Python