I'm trying to find a way to write a script that accepts input from the user, After which, it will open webpages. The code looks like this so far:
jurisdiction = input("Enter jurisdiction:")
if jurisdiction = 'UK':
import webbrowser
webbrowser.open('https://www.legislation.gov.uk/new')
webbrowser.open('https://eur-lex.europa.eu/oj/direct-access.html')
elif jurisdiction = Australia:
import webbrowswer
webbrowser.open('https://www.legislation.gov.au/WhatsNew')
else:
print("Re-enter jurisdiction")
This leads to a syntax error at line 3:
File "UK.py", line 3
if jurisdiction = UK
^
SyntaxError: invalid syntax**
I would like to know if there is anything in the code that I have missed or should not have had there? Also, is there an alternative way to do what I am trying to achieve here?