tab = [] for n in range(10): def foo(): print n tab.append(foo) for t in tab: t()