mardi 22 juin 2021

How to limit an input of a User [duplicate]

I don't know how to limit the input this is what I had: "if TIME in range(1, 400)". But this doesn't work sadly. I want that the user can input min 1 and max 400 and if the input is more than it would just print too many seconds.

TIME = input("Enter Time: ")
elif LG == LU:
        if TIME in range(1, 400):
            requests.post(
                f"MYAPIURl")
        else:
            print("You cant send 400 seconds of Buff / please buy the addon on our Mc shop")
        sleep(1)
        cls()
        Server2()

Aucun commentaire:

Enregistrer un commentaire