Python Match Case Substring Method Sqlite Database Manager