fork download
  1. import random
  2.  
  3.  
  4. class Main:
  5.  
  6. def __init__(self):
  7. self.templ1 = ("aaa", "bbb", "ccc")
  8. self.templ2 = ("ddd", "eee", "fff")
  9.  
  10. def Template1(self):
  11. templ1_random =random.choice(self.templ1)
  12. return templ1_random
  13.  
  14. def Template2(self):
  15. templ2_random = random.choice(self.templ2)
  16. return templ2_random
  17.  
  18. def All(self):
  19. list0 = [self.Template1(), self.Template2()]
  20. all_random = random.choice(list0)
  21. return all_random
  22.  
  23.  
  24. final = Main()
  25. print(final.All())
Success #stdin #stdout 0.03s 11708KB
stdin
Standard input is empty
stdout
ccc