From a776665af6e9c6cde4e80dde00a3fafce1aba9f9 Mon Sep 17 00:00:00 2001 From: Afeefa Abdullah Manjanoor <70969985+afeefaa333@users.noreply.github.com> Date: Thu, 13 Oct 2022 19:43:43 +0530 Subject: [PATCH] Added create_password --- scripts/create_password/create_random_password.py | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 scripts/create_password/create_random_password.py diff --git a/scripts/create_password/create_random_password.py b/scripts/create_password/create_random_password.py new file mode 100644 index 0000000..a584ae3 --- /dev/null +++ b/scripts/create_password/create_random_password.py @@ -0,0 +1,10 @@ +# create random password of given length +import string +import random +def create_password(length): + temp_password = '' + for i in range(length): + temp_password += random.choice(string.ascii_letters+ string.digits+'!@#$%^&*()') + return password +length=int(input("Enter length of password: ")) +print(create_password(length)) \ No newline at end of file