From 28a945e5b8c7b005c30696d016ea14ca267e5d1e Mon Sep 17 00:00:00 2001 From: shubham Date: Tue, 25 Mar 2025 10:18:37 +0530 Subject: [PATCH] 8 character solved --- 8-Character Combinations.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 8-Character Combinations.py diff --git a/8-Character Combinations.py b/8-Character Combinations.py new file mode 100644 index 00000000..34a1ebca --- /dev/null +++ b/8-Character Combinations.py @@ -0,0 +1,23 @@ +import itertools +import string +#it used to generate the combinations +# contain pre defined character set(letter,digits,punctuations) + + +charset = string.ascii_letters + string.digits + string.punctuation +# This creates a set of all possible characters + + +def generate_combinations(): + for combo in itertools.product(charset, repeat=8): + yield ''.join(combo) +#Generates all possible 8-character sequences using charset. + + +if __name__ == "__main__": + count = 0 + for combination in generate_combinations(): + print(combination) + count += 1 + if count >= 10: + break