Skip to content

Instantly share code, notes, and snippets.

@Gab-km
Created January 12, 2012 16:56
Show Gist options
  • Save Gab-km/1601627 to your computer and use it in GitHub Desktop.
Save Gab-km/1601627 to your computer and use it in GitHub Desktop.
簡易顔文字メーカー
# -*- 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