Advertisement
Guest User

Untitled

a guest
Dec 4th, 2016
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. s = {"dragons": 100, "evil wizards": 100, "trolls": 100}
  2. def tl(env):
  3. licks = 252
  4. if len(env) == 0:
  5. return "It took 252 licks to get to the tootsie roll \
  6. center of a tootsie pop."
  7. else:
  8. total = sum(env.values())
  9. licks += total
  10. compare = [x for x in env.values()]
  11. high = max(compare)
  12. print high
  13. parse = [k for k, v in env.iteritems() if v == high]
  14. toughest = ''.join(parse)
  15. return "It took {} licks to get to the tootsie roll center of a tootsie \
  16. pop. The toughest challenge was {}.".format(licks, toughest)
  17.  
  18. #
  19. # stuff = {"dragons": 100, "evil wizards": 110, "trolls": 50}
  20. # dv = 50
  21. # inv_map =
  22. # print inv_map
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement