Guest User

Untitled

a guest
Apr 24th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. import random
  2.  
  3. wordlist = [
  4. "特盛",
  5. "GPA",
  6. "どんぐり拾い食い",
  7. "DJ",
  8. "えっちいいねマン",
  9. "路上寝",
  10. "ハゲ"
  11. ]
  12. class Itosan:
  13. def __init__(self):
  14. pass
  15.  
  16. def generate(self, num):
  17. word = ""
  18. for i in range(num):
  19. word_tmp = random.choice(wordlist)
  20. word += word_tmp
  21. wordlist.remove(word_tmp)
  22.  
  23. return word
  24.  
  25. def into_man(self, string):
  26. print(string)
  27. if string.find("マン") == -1:
  28. return string + "マン"
  29.  
  30. else:
  31. return string
  32.  
  33. if __name__ == "__main__":
  34. Itoname = Itosan()
  35. num = random.randint(1, len(wordlist))
  36. name = Itoname.generate(num)
  37. ito_bessyo = Itoname.into_man(name)
  38. print(ito_bessyo)
Add Comment
Please, Sign In to add comment