Advertisement
Guest User

Untitled

a guest
Sep 18th, 2019
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. def create_structured_message(n_caracteres_diff, n_repetitions):
  2. dictionnaire = list(string.ascii_letters[:n_caracteres_diff])
  3. text_croise = "".join(np.repeat("".join(dictionnaire), n_repetitions))
  4. text_random = "".join(np.random.permutation(list(text_croise)))
  5. text_suivi = "".join(sorted(list(text_random)))
  6. return text_croise, text_random, text_suivi
  7.  
  8. text_croise, text_random, text_suivi = create_structured_message(3, 5)
  9. print("text_croise {}".format(text_croise))
  10. print("text_random {}".format(text_random))
  11. print("text_suivi {}".format(text_suivi))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement