MATCH in python (imp)

 a = int(input("enter the number : "))

match a:
    case 1:
        print("case is 1")
    case 2:
        print("case is 2")
    case 3:
        print("case is 3")
    case _:
        print("there is no such case")

Comments

Popular posts from this blog