[Python] Calling the exit function in Python

Discussão em 'Python' iniciado por Stack, Dezembro 6, 2024.

  1. Stack

    Stack Membro Participativo

    import sys

    e = input ("Do you want to continue?(Enter Y or N)?")
    If e = "Y"
    sys.exit()


    I'm trying to create an exit function that allows the user to exit using the preexisting language. "sys.exit() already exists in the system but I want to a conditional for its use case.

    Continue reading...

Compartilhe esta Página