I want to make a game that allows users to make a log in which requires them to make a username and password,I will then give them an option whether they woul like to register or log in.This is where I am stuggling as I dont know how to save their log in and then make it re appear when they choose to register with their log in.I dont know if this makes sense but it would really help if you could suggest a solution,i have inserted a bit of my code.

   name=input("Please enter your name ")
    age=input("Please enter your age ")
    print("Hello" + name)
    username=name+age
    print("Your username is" +username)
name = ['shiv','deepak','baldev','shishupal','raj','depanshu','balram','shivani','shweta','deepika','manisha','shruti']
email = ['shiv123','deepak123','baldev123','shishupal123','raj123','depanshu123','balram123','shivani123','shweta123','deepika123','manisha123','shruti123']
psk = ['shiv123','deepak123','baldev123','shishupal123','raj123','depanshu123','balram123','shivani123','shweta123','deepika123','manisha123','shruti123']

nam = input("Enter your name : ")

if nam in name :
  print ("Welcome "+nam+".")

  em = input("Please enter your email id : ")

  if em in email:
    print ("Welcome : " +em )

    passkey = input("Please enter your password : ")

    if passkey in psk :
      print ("Welcome "+nam+" Nice to meet you again...")

    else:
      print("Wrong Credential !")

  else:
      print("Wrong Credential !")

else:
      print("Wrong Credential !")

I have do this in python 3.6.1 version you can try.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.