l = [] for x in range(10): l.append(lambda: x + 10) # [cell-var-from-loop]