Why do they say its wrong when I use the print function while using .join to join the strings together?

Inside the picture is my code and when I used the print function, it says its shows none even when the screen shows the full sentence. The solution gives the exact same code but without the use of the print function.

Whyy??

Your line of code is saying;
we want to assign the variable (reapers_line_one) with the value that’s returned when running the function ‘print(…)’, but it wont return one.

The role of the print function is, more or less, just to output whatever is in the brackets to the screen. It wont result in anything being sent back to the program - hence your variable is being assigned the value ‘None’.
So, you’ll get the code printed to the screen, but it’s not working internally as expected.
Hope that helps.

3 Likes

oh now I get so print function is just to print whatever is in the brackets and into the console and not to the program but the code sends it to the program. right?

1 Like

Thanks man. This is very helpful to me.

2 Likes

Cheers.
Don’t think I explained it brilliantly, but it was tricky trying to write it in a way that wouldn’t potentially confuse you even more.
I wouldn’t stress too much if you’re still not 100% sure what’s happening, as it should become clearer the more you do - especially when you look into things like functions.
Enjoy!

1 Like