Leetcode Design Hashmap Python Syntax If Else Statement Javascript