I store variables in a list to access them later with a for loop.
My desire is to set some of the variables not just the list's entries to None
import numpy as np
a = np.random.rand(3,2)
b = np.random.rand(3,2)
c = np.random.rand(3,2)
data_lists = [a,b,c]
data_lists[:] = [None]
won't work. Does anyone know a pythonic way to do it without explicitly writing a = None
and so on?