Advertisement
Peaser

wow

Aug 14th, 2015
545
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.22 KB | None | 0 0
  1. if word == "thing":
  2.   thingy()
  3.  
  4. elif word == "stuff":
  5.   stuffy()
  6.  
  7. else:
  8.   thingstuff()
  9.  
  10.  
  11. #then there's this...
  12.  
  13. {(word=="thing"):thingy, (word=="stuff"):stuffy, (word not in "thingstuff"):thingstuff}[True]()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement