def test(): def fnc(): print "OK" print fnc() test()