Py file import stops importing

Discussion in 'Python' started by Brenduan, Dec 22, 2019.

  1. Brenduan

    Brenduan

    Joined:
    Dec 22, 2019
    Messages:
    1
    Likes Received:
    0
    Hello, when I try to run these two scripts together after a few tries it stops working? Is this because of the import module?

    Code (Python):
    test = input("Go to new script?: ")
    if test=="yes":
        print("going to new script")
        import test2
     
    Code (Python):
    test = input("Go to old script?: ")
    if test=="yes":
        print("going to new script")
        import test1
     
    Brenduan, Dec 22, 2019
    #1
    1. Advertisements

  2. Brenduan

    krypton

    Joined:
    Jan 4, 2020
    Messages:
    8
    Likes Received:
    0
    Location:
    Ilorin, Kwara, Nigeria
    what version of python are you using and what terminal
     
    krypton, Jan 4, 2020
    #2
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.