Skip to content

Instantly share code, notes, and snippets.

@masahitojp
Created November 29, 2016 15:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save masahitojp/12cb69d1e4feada65f964a6e485fee67 to your computer and use it in GitHub Desktop.
Save masahitojp/12cb69d1e4feada65f964a6e485fee67 to your computer and use it in GitHub Desktop.
$ python3 ppap.py
πŸŽβœ’βœ’πŸŽπŸŽβœ’πŸŽπŸŽπŸπŸŽβœ’βœ’πŸŽβœ’βœ’βœ’βœ’πŸŽβœ’βœ’πŸŽπŸŽβœ’βœ’βœ’πŸŽβœ’βœ’πŸπŸŽβœ’Pen Pineapple Apple Pen
# -*- coding: utf-8 -*-
import random
PPAP = ['\N{Black Nib}', '\N{PINEAPPLE}', '\N{RED APPLE}', '\N{Black Nib}']
ppap = []
def tap(x, f):
f(x)
return x
while ppap[-4:] != PPAP:
ppap.append(tap(random.choice(PPAP), lambda x: print(x, end='')))
print("Pen Pineapple Apple Pen")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment