Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def create_emoticon_generator():
- while True:
- strings = "!@#^*_-=+/,.;~"
- grouped_strings = [("(", ")"), ("<", ">"), ("[", "]"), ("{", "}")]
- grp = random.choice(grouped_strings)
- face_strings_list = [random.choice(strings) for icon in range(3)]
- face_strings = "".join(face_strings_list)
- emoticon = (grp[0], face_strings, grp[1])
- emoticon = "".join(emoticon)
- yield emoticon
- g = create_emoticon_generator()
- print([next(g) for smiley in range(4)])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement