
July 27th, 2004, 01:52 AM
|
|
Contributing User
|
|
Join Date: May 2004
Posts: 36
Time spent in forums: 20 h 19 m 39 sec
Reputation Power: 10
|
|
|
function name from a variable
my problem is that,
no = 256
txt = "test"
def test_256():
print "this function name is test_256"
fname = "%s_%s"% (txt, no)
fname()
but it doesn't work.
how can I use a variable to function name
best regards
|