Assume you have the following list:
a=list(range(1,6)))
a. reverse()
At this time, the following code will succeed.
b=[i+g for i, gin enumerate(a)]
print(b)
"i
appears as ""can not assign to operator"" for the code below."
b=[]
for i,gin enumerate(a):
i+g=c
b.append(c)
print(b)
Why is it not good to write separately, even though it works well if it is written with the inclusion?
I think this is a rudimentary point, but I look forward to hearing from you.
i+g=c
was misaligned, and the correct one was c=i+g
.
Thank you for your comment.
© 2025 OneMinuteCode. All rights reserved.