What do the parts marked with green lines in Figure 1 and Figure 2 do to the code respectively? Why are their running results different? I am a Python beginner and hope someone can answer this.
(Figure 1 and Figure 2 are two versions of the same code, and Figure 3 is the test for Figure 1 and Figure 2)