Accessing a Python variable in a list
Question: I think this is probably something really simple, but I'd appreciate a hint:

I am using a python list to hold some some database insert statements:

    
    
    list = [ "table_to_insert_to" ],["column1","column2"],[getValue.value1],["value2"]]
    

The problem is one of the values isn't evaluated until runtime-- so before the
page even gets run, it breaks when it tries to import the function.

How do you handle this?


Answer: You've just pointed out one (out of a zillion) problems with global variables:
not using global variables is the best solution to this problem and many
others. If you still mistakenly believe you must use a global variable, put a
placeholder (e.g. `None`) in the place where the value you don't yet know will
go, and assign the right value there when it's finally known.

