Advertisement
here2share

# fn_dict.py

Feb 20th, 2020
339
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.19 KB | None | 0 0
  1. # fn_dict.py
  2.  
  3. def f1(x,y):
  4.     return 1,x,y
  5. def f2(x,y):
  6.     return 2,x,y
  7. def f3(x,y):
  8.     return 3,x,y
  9. for x in 'abc':
  10.     for y in 'xyz':
  11.         for i in 1,3,2:
  12.             print {1:f1,2:f2,3:f3}[i](x,y)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement