Is “print” required to show text strings?

In a sample it said: >>>”spam” + ‘egg’ “Spam egg” When I try it myself, there is no output? I thought you can get the text shown without typing in “print”?

7/10/2019 8:05:51 AM

Sean Wu

7 Answers

New Answer


Sean Wu When you work on interpreter( three ">>>" is an indication you are working on interpreter) then you don't need to write print (although you can) When you work with script, like a python program in codeplayground, then you must if you want to print any data.




You kind of have to, because just putting random strings doesn't do anything


thanks Airree. So that part of the sample is not sample of codes but just an explanation i guess?...


An explanation of the command prompt, what you enter and the output you get from the Python interpreter.


Your prompt (aka Interpreter) is not the same as a python program. Stuff you put in a file is evaluated at runtime, while the interpreter prints the returning value, you don't have to type the print. If you put a string in a file, the file doesn't return anything, you have to print it.


You need to direct the print output to the console so you need the print command 🤔