Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # switchlike.py
- def switchOne():
- print 'first'
- def switchTwo():
- print 'second'
- def switchThr():
- print 'third'
- for z in '32121132':
- eval({1:'switchOne()',2:'switchTwo()',3:'switchThr()'}[int(z)])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement