How to make Python go back to asking for input
Question: So I want the program to go back to asking for the input once it has
completed.

I've asked this in reddit and gone through quite a many similar threads here
and so far the answer seems to be loops if true perform x. But what is the
command for the program to go back to asking for the input on line 5?

    
    
    from selenium import webdriver
    from selenium.webdriver.common.keys import Keys
    from time import sleep
    
    card = input()
    
    driver = webdriver.Firefox()
    driver.get("http://www.mtgprice.com/")
    elem = driver.find_element_by_xpath("//form/input")
    elem.send_keys(card) # input
    driver.implicitly_wait(5) # seconds
    driver.find_element_by_class_name('btn-blue').click()
    


Answer: Everyone you asked is pretty much right. Additionally I'd put the chunk of
code in a function just because.

    
    
    from selenium import webdriver
    from selenium.webdriver.common.keys import Keys
    from time import sleep
    
    def web_stuff(card):
        driver = webdriver.Firefox()
        driver.get("http://www.mtgprice.com/")
        elem = driver.find_element_by_xpath("//form/input")
        elem.send_keys(card) # input
        driver.implicitly_wait(5) # seconds
        driver.find_element_by_class_name('btn-blue').click()
    
    
    while loop_condition:
        card = input()
        web_stuff(card)
    

