fork download
  1. text = """The key to your curiosity
  2. Lies in this riddle quite plainly
  3. Forty five before it was
  4. Now a tribe but once did buzz
  5. Though quite religious Im historic too
  6. and followed by industry book and news
  7. At this point youve found out two of the four
  8. But trust me there is still much more
  9. Above is the lock below is the key
  10. And by that I mean the numbers youll see
  11. Ill give you a clue so as not to be cruel
  12. Line word letter will be your tool
  13. """
  14.  
  15. def extract(t):
  16. if len(t) not in (3,2): raise ValueError("Tuple must be 2- or 3-tuple")
  17. if len(t) is 2:
  18. return text.split("\n")[t[0]-1].split(" ")[t[1]-1]
  19. elif len(t) is 3:
  20. return text.split("\n")[t[0]-1].split(" ")[t[1]-1][t[2]-1]
  21.  
  22. ordered_nums = [
  23. [(1,1,2), (1,3,2), (3,1,2), (3,1,3), (7,1,1), (1,2,3), (11,3), (10,3,2), (9,1,1), (7,4,4), (9,8,2), (8,7,1), (11,4), (4,6,1), (2,1,3), (2,2,1), (3,1,4), (7,2), (3,1,1), (9,1,1), (5,3,1)],
  24. [(11,3), (8,3,1), (4,3,3), (5,3,5), (5,1,2), (5,1,1), (11,8), (4,3,2), (8,3,2), (11,7,1), (11,1,3), (11,1,1), (4,7,4), (6,2,7), (5,5,1), (5,5,5), (12,2,1), (11,2,1), (2,4,1), (3,2,4), (10,1,1), (10,3,4), (1,4,1), (1,4,2), (1,4,3), (11,4), (3,1,3), (6,2,7)],
  25. [(3,1), (3,2), (2,1,4), (3,2,1), (3,2,2), (1,5,3), (8,2,4), (5,1,1), (5,3,5), (5,3,7), (7,4,4), (6,2,7), (12,2,3), (7,3,4), (7,3,2), (4,3,2), (9,2), (9,3), (1,2)],
  26. [(9,3), (2,6,1), (4,2), (11,11,2), (1,1,1), (7,8), (5,1,2), (5,2,3), (5,3,9), (8,6,2), (8,6,3), (8,6,2), (8,6,5), (8,4,5), (10,3), (3,5,3), (2,1,4), (1,1,2), (3,5,2), (12,3,6), (10,5,2), (12,2,4), (12,2,1), (2,5,3), (2,5,4), (5,5,1), (8,3)],
  27. [(11,1), (11,2), (3,4), (10,1,1), (12,2,1), (10,5,3), (9,8,3), (11,1), (8,8,1), (2,6,3), (9,8,1), (9,8,2), (3,4), (2,6,1), (10,7,2), (10,7,4), (12,7,4), (12,4,2), (9,4,3)],
  28. [(3,4), (5,5,3), (11,4), (1,2), (12,2), (8,7,3), (7,2,3), (2,6,1), (9,7,2), (11,11,4), (12,6,4), (1,3,2), (2,2,2), (3,2,4), (5,2), (3,3,1), (11,7), (10,4), (11,5,1)]
  29. ]
  30.  
  31. for i in ordered_nums:
  32. print("".join(list(map(extract, i))))
Success #stdin #stdout 0.02s 9992KB
stdin
Standard input is empty
stdout
hoorAyyouhAvemadeitthisFAr
youmighTnotrealIzehowgreAtyouare
FortyfivesfirsTgovernoristhekey
theparTofhistitlethatssharedwithme
IllgiveitAwayIllmakeitpublic
itsakeywordcipheronequitebasIc