Advertisement
Guest User

Untitled

a guest
Apr 27th, 2016
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.43 KB | None | 0 0
  1. # https://technology.jana.com/2016/04/26/challenge-your-python-knowledge/
  2. # 1 - iterator object evals as true, but is empty
  3. mystery = iter('')
  4.  
  5. # 2 - double precision does not allow counting in 1-increments up to inf.
  6. # probably something like 1e18 could be enough that x+1 == x
  7. mystery1 = 1
  8. mystery2 = 1e308
  9.  
  10. # 3 - self-referential dict
  11. mystery1 = {}
  12. mystery2 = {}
  13. mystery1['self'] = mystery1
  14. mystery2['self'] = mystery2
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement