Why do these two blocks of code not do the same thing?
category = None
prodid_brand = None
prod_type = None
prod_application = None
prod_handletype = None
prod_series = None
I wanted to "clean up" my code by doing the following, but it does not work the same as the code above.
column_list = [category, prodid_brand, prod_type, prod_application,
prod_handletype, prod_series]
for col in column_list:
col = None
Also is there a "cleaner" way to instantiate all the variables than the top block of code.
NameErrors. You should read nedbatchelder.com/text/names.html; it's not clear why you thought they would do the same thing.category = prodid_brand = prod_type = prod_application = prod_handletype = prod_series = None