n=len(Continents.index) fig,ax=plt.subplots() def action(curr): global colors global cmap global Continents global color_dict if curr==n: a.