The error is because function names are not string you can't call function like 'func1'()
it should be func1()
,
You can do like:
{
'func1': func1,
'func2': func2,
'func3': func3,
}.get(choice)()
its by mapping string to function references
side note: you can write a default function like:
def notAfun():
print "not a valid function name"
and improve you code like:
{
'func1': func1,
'func2': func2,
'func3': func3,
}.get(choice, notAfun)()