控制流 / 条件语句 / 匹配语句

def get_point():
    return 55


str_v = ""
point = get_point()

match point:
    case (00):
        str_v = "(0, 0) point"
    case (_, 1):
        str_v = f"(_, 1), y == 1"
    case (1, y):
        str_v = f"(1, {y}), x == 1"
    case x, y if x == y:
        str_v = f"({x}{y}), x == y"
    case _:
        str_v = "other point"

print(f"{str_v = }")