+ 3

Can you please explain the output of this code?

a = () def func(n): k = () k = k + n return k for i in range(0,5,2): a += func((i, i+1)) print(len(a) Answer is 6

11th Mar 2020, 12:15 PM
APC (Inactive for a while)
APC (Inactive for a while) - avatar
1 Answer
11th Mar 2020, 12:15 PM
APC (Inactive for a while)
APC (Inactive for a while) - avatar