@clcoding The loop creates 3 functions and stores them in funcs.
But each function doesn't store the value of i at the time it is created. Instead, each function store the i after the loop finishes: i = 2
Print of all the functions: [f() for f in funcs] results in: [2, 2, 2]