Leetcode Python String Format