+ 1
Can someone explain this code for me?
What is the output of this code? a=[x for in range(4)] print(sum(a[1::-2]+a[::-3]))
3 Respostas
+ 1
There is a problem:
a = [x for in range(4)]
there is no variable before the "in", so this is a syntax error
+ 1
Have a look at the corrected and commented source at https://code.sololearn.com/c9DA0Yd9E699
0
it was a question of a quiz. the given answer is 4. But I cant understand the mechanism