Hi Guys,
Am new to Python, came across a strange looking piece of code as below....
I checked and it works but I am not understanding the return statement. Can you please help.....
can any one please elaborate the return statement here in depth?
Thanks,
PL
Am new to Python, came across a strange looking piece of code as below....
I checked and it works but I am not understanding the return statement. Can you please help.....
1 2 |
def v_add(v, w): return [v_i + w_i for v_i, w_i in zip (v, w)] |
Thanks,
PL