Leetcode Arrays And Strings In Python Definition Function