From 1b7cfef62f8f5375d45478a056b01834a7badb33 Mon Sep 17 00:00:00 2001 From: nanato12 Date: Tue, 14 Mar 2023 22:17:23 +0900 Subject: [PATCH] Success --- main.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index 4693ad3..13ec753 100644 --- a/main.py +++ b/main.py @@ -1,2 +1,10 @@ -def add(a, b): - return a + b +from random import choices +from string import ascii_letters, digits + + +def random_string(s: str, n: int) -> str: + return "".join(choices(s, k=n)) + + +if __name__ == "__main__": + print(random_string(ascii_letters + digits, 10))