What is the difference between these two codes?


why does one of them prints a ‘None’ at the end?


If you run print 4 times instead of 3, then getting an extra line printed out is to be expected, isn’t it?


sure but why ‘None’ is printed ?shouldn’t it rather be printed 3 5 7 again?


Where would 3 5 7 come from? You’re printing the result of the function call

Also, 3 5 7 is 3 values, but that’s only one extra print (unless you have the string ‘3 5 7’ but you’re certainly not creating that anywhere

So if you look at the function, what is its result? You’re printing that, in fact, looking at what you print tells you what the result is


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.