Created
July 28, 2011 17:07
-
-
Save b1naryth1ef/1111973 to your computer and use it in GitHub Desktop.
Method 2: Dictionarys
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def MyFunc1(iny): | |
print iny | |
def MyFunc2(iny): | |
print iny*2 | |
def MyFunc3(iny): | |
print iny*3 | |
d = {"A":MyFunc1,"B":MyFunc2,"C":MyFunc3} | |
d['A']("hi") | |
d['B']("hi") | |
d['C']("hi") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment