From 74a86e35fe20d8c6cb9403c52506f828f800e8f4 Mon Sep 17 00:00:00 2001 From: AghaKazem <126712351+AghaKazem@users.noreply.github.com> Date: Sun, 26 Mar 2023 01:42:40 +0330 Subject: [PATCH] Faster Random String --- scant3r/core/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scant3r/core/utils.py b/scant3r/core/utils.py index 623eb9fe..46808a11 100644 --- a/scant3r/core/utils.py +++ b/scant3r/core/utils.py @@ -17,7 +17,7 @@ def random_str(num: int) -> str: geCr15 """ num = int(num) - return "".join(random.choice(string.ascii_uppercase) for _ in range(num)) + return "".join(random.choices(string.ascii_uppercase, k=num)) # Print the request in the console. Arg the request. Return a string. Empty string if no request