Skip to content

Instantly share code, notes, and snippets.

@utgwkk
Created September 23, 2018 03:47
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 utgwkk/ece9ec2f96ce4941b60e1f24759eae90 to your computer and use it in GitHub Desktop.
Save utgwkk/ece9ec2f96ce4941b60e1f24759eae90 to your computer and use it in GitHub Desktop.
H_na_rorotoroガチャ
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