Created
September 23, 2018 03:47
-
-
Save utgwkk/ece9ec2f96ce4941b60e1f24759eae90 to your computer and use it in GitHub Desktop.
H_na_rorotoroガチャ
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
import random | |
import itertools | |
def rorotoro(): | |
for ro in range(1, 5): | |
to = 4 - ro | |
for rorotoro in itertools.permutations((['ro'] * ro) + (['to'] * to)): | |
yield ''.join(rorotoro) | |
def h_na_rorotoro(num_min_underscores=1, num_max_underscores=30): | |
for i in range(num_min_underscores, num_max_underscores): | |
underscore1 = '_' * i | |
for j in range(num_min_underscores, num_max_underscores): | |
underscore2 = '_' * j | |
for rrtr in rorotoro(): | |
yield "H{}na{}{}".format(underscore1, underscore2, rrtr) | |
print(random.choice(list(h_na_rorotoro()))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment