Oh well, error in your case is pretty simple (I didn't even take a closer look at first)... this line:
means assignment (single equality sign), while you want to use == to check for equality.
Also, if you compare to '1' instead of 1, you don't even need to cast input to integer, but that's a detail.
if access=1:
means assignment (single equality sign), while you want to use == to check for equality.
Also, if you compare to '1' instead of 1, you don't even need to cast input to integer, but that's a detail.