From c3fdd5ac0218ba674fa70f31206c72a7481ee3c7 Mon Sep 17 00:00:00 2001 From: YuCheng Hu Date: Fri, 19 Mar 2021 09:39:22 -0400 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E9=9A=8F=E6=9C=BA=E5=AD=97?= =?UTF-8?q?=E7=AC=A6=E4=B8=B2=E7=94=9F=E6=88=90=E7=9A=84=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/RandomStringGenerate.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tests/RandomStringGenerate.py b/tests/RandomStringGenerate.py index f7b9ac5..c5de637 100644 --- a/tests/RandomStringGenerate.py +++ b/tests/RandomStringGenerate.py @@ -2,7 +2,7 @@ # Python Random String Password # Author - HoneyMoose(huyuchengus@gmail.com) -# Link Article - https://www.ossez.com/c/open-source/python/14 +# Link Article - https://www.ossez.com/t/python/13398 import string from random import choice @@ -22,7 +22,6 @@ if __name__ == "__main__": 3 print(__name__) - amount = int(input("请输入需要生成随机字符串的数量: ")) number = int(input("请输入随机字符串的长度: ")) @@ -32,3 +31,11 @@ for i in range(1, amount + 1): print('') for i in range(1, amount + 1): print(f" 随机字符串 [Ascii Uppercase String]: {i} - {repr(random_password(number, string.ascii_uppercase))} ") + +print('') +for i in range(1, amount + 1): + print(f" 随机字符串 [Ascii Lowercase String]: {i} - {repr(random_password(number, string.ascii_lowercase))} ") + +print('') +for i in range(1, amount + 1): + print(f" 随机字符串 [Ascii Digits String]: {i} - {repr(random_password(number, string.digits))} ")