Created
January 12, 2012 16:56
-
-
Save Gab-km/1601627 to your computer and use it in GitHub Desktop.
簡易顔文字メーカー
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
import random | |
import datetime | |
left_brows = ['´', '`', ''] | |
left_eyes = ['・', '^', ';', '>', ''] | |
mouths = ['ω', '∀', 'ρ', '_', 'Д', 'д', ''] | |
right_eyes = ['・', '^', ';', '<', ''] | |
right_brows = ['´', '`', ''] | |
if __name__ == '__main__': | |
name = input("名前を入れてください:") | |
for c in name: | |
seed = ord(c) | |
random.seed(seed + datetime.datetime.today().toordinal()) | |
print(name + 'の顔文字:(' + ''.join( | |
[random.choice(p) for p in | |
[left_brows, left_eyes, mouths, right_eyes, right_brows] | |
]) + ')') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment