Python Match Case Substring Method Sql Practice Leetcode Java