reformat leetcode templates for python