Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def create_structured_message(n_caracteres_diff, n_repetitions):
- dictionnaire = list(string.ascii_letters[:n_caracteres_diff])
- text_croise = "".join(np.repeat("".join(dictionnaire), n_repetitions))
- text_random = "".join(np.random.permutation(list(text_croise)))
- text_suivi = "".join(sorted(list(text_random)))
- return text_croise, text_random, text_suivi
- text_croise, text_random, text_suivi = create_structured_message(3, 5)
- print("text_croise {}".format(text_croise))
- print("text_random {}".format(text_random))
- print("text_suivi {}".format(text_suivi))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement