file .txt in python

Apr 21 2021 12:34 PM
Hi, I'm looking to make an application for myself that will allow me to find my password I have between my email and my password to save it then it prevents me to write my email and I re-read my password but I can not put more email and password in my text file if I enter another email and password its primed me the other email and word Pass.
  1. def inscription_code():  
  2.     email_inscription = email_entry.get()  
  3.     pass_inscription = pass_entry.get()  
  4.     File_inscription_name = os.listdir()  
  5.  if str(email_inscription) + ".txt" in File_inscription_name:  
  6.  print("email deja utiliser")  
  7.  else:  
  8.         File = open(str(email_inscription) + ".txt""w")  
  9.         File.write(str(email_inscription) + ":" + str(pass_inscription))  
  10.         File.close()  
  11.   
  12. def File_read():  
  13.     File = open()  
  14.     File.read()  
  15.  print(File)  
  16.     File.close()  
thank you in advance.