This web.py script runs fine in both 2.7 and 3.6.
import webbrowser def websites(): new = 2 choice = input('Type site name:\n> ') # I have raw_input here to run in 2.7 site = choice url1 = 'www..com' url = 'http://' + url1[:4] + site + url1[4:] webbrowser.open(url,new) if __name__ == "__main__": websites()I do have both programs in the same directory so I don't know why the one won't open the other in 3.6.