So here is the code if run the begin function it will just run option1 and not print the other stuff like i want to make this login thing work but it won't work for some reseon.
def login():
print ("You are now logged in")
def reg():
file = open ("User_details","a")
file.write("\n"+"Ussername"+","+"Password"+","+"Age"+","+"Real_name"+","+"Last_name"+","+"Email")
file.close
def Access(option):
if option == "login":
input ("Ussername: ")
input ("Password: ")
input ("Age: ")
input ("Real name: ")
input ("Last name: ")
input ("Email: ")
login()
else:
print ("Enter all the info we will be asking you to register")
input ("Ussername: ")
input ("Password: ")
input ("Age: ")
input ("Real name: ")
input ("Last name: ")
input ("Email: ")
reg()
def begin():
print ("Hi my name is Steve would you like to register or login")
option1 = input ("Login or Register: ")
if option1 != "login" and "register":
begin()
if option1 == "register":
Access()
if option1 == "login":
login()
begin()
Access()