Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#54文字の文学賞 のジェネレータ https://ujiqn.github.io/54-novel/ に入れる用スクリプト(ランダム版)
#!/usr/bin/env python
WIDTH = 9
HEIGHT = 6
import random
#src = "┣╋┻┳┫"
src = "☐⊡▤▥▩▨▧▦▣"
# string -> [shuffled string]
lines = [ "".join(random.choices(src,k=WIDTH)) for _ in range(HEIGHT) ]
print("".join(lines))
@tobynet

This comment has been minimized.

Copy link
Owner Author

tobynet commented Jul 4, 2018

動作例:

$ python random-string-for-54-novel.py
☐▥▩▨▧▣▩☐▧▦⊡▦☐▧▣▤▤▧▦▣☐▨▧▦▨⊡▨▦▥▤▦▦⊡▧▥☐▧☐☐☐▩▥▣▩▩▧⊡▧▨▦▤▨▤☐

https://ujiqn.github.io/54-novel/ での例:

Image from Gyazo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.