Difference between writing something on one line and on several lines

后端 未结 6 1561
我寻月下人不归
我寻月下人不归 2021-01-13 03:16

Where is the difference when I write something on one line, seperated by a , and on two lines. Apparently I do not understand the difference, because I though t

6条回答
  •  粉色の甜心
    2021-01-13 03:39

    At the first case, the commands

    a, b = b, a + b;
    

    will do first the sum a + b and then will do the assignment. In that case, b always contains 1. This explains why the final result is 6, because you are adding 1 six times.

    The second code you posted its correct.

提交回复
热议问题