I have several functions in the database as a strings and there is a main function that should take these functions from the database and execute them as functions, and not as text.
How I can transform a string (which describes a function) into a function with arguments and execute it in Python?
I'm tried exec but I can't return something from function and use it.
For example my function:
some_function = """
def my_random_function(some_param):
print(some_param)
return time.time()
"""