I want to print function names using this dictionary-
def pressKey() :
print "is pressed"
def userLogin() :
print "Code to login to <Server Name> with <username>"
act={'Login':userLogin,'press':pressKey}
I tried via this (took from an answer)
for key, value in act.iteritems() :
print value,'()\t',
act[key]()
The function is being called (the second line of the loop) but this code gives the output as-
<function pressKey at 0x0000000002F2DC88> () is pressed
<function userLogin at 0x00000000039BAEB8> () Code to login to <Server Name> with <username>
And i want the output as-
pressKey() ispressed
userLogin() Code to login to <Server Name> with <username>
Please help how can i get that !.Thanking you in advance.