🅿️Python enum,bisect type problem solving