From 8e75a82b5e15288268c220cba6c6b31631804817 Mon Sep 17 00:00:00 2001 From: hanya98 Date: Tue, 7 Oct 2025 21:34:20 +0530 Subject: [PATCH] saving passwords using a dictionary to store encrypted passwords as value as org password as key. --- password | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 password diff --git a/password b/password new file mode 100644 index 0000000..10d8ed2 --- /dev/null +++ b/password @@ -0,0 +1,18 @@ +dict={} +n=int(input('enter no of passwords to be entered')) +for i in range(n): + t='' + org=input('enter org password') + for i in org[::-1]: + t+=i+'#' + dict[org]=t +num=int(input('enter no of passwords to be changed')) +for i in range(num): + k='' + og=input('enter org password') + cg=input('enter new password') + dict.pop(og) + for i in cg[::-1]: + k+=i+'#' + dict[cg]=k +print(dict)