import matplotlib.pyplot as plt fig, ax = plt.subplots() # do stuff here fig = ax = None del(fig, ax) plt.show()
The None and del<
None
del<