+ 1

Difference between print and this?

I thought you had to use print: to use text, so now that I know the quotes are what make the text possible, I don’t really understand what the purpose of “print:” is

2nd May 2019, 9:02 PM
Matthew Green
Matthew Green - avatar
3 Answers
+ 4
The print() function is used to display objects (e.g. text) to the console. print("Hello world!") You'll see the phrase Hello world! as output in the console.
2nd May 2019, 9:12 PM
Diego
Diego - avatar
+ 3
I think print is the short term for printscreen. It displays the results on your screen.
2nd May 2019, 9:21 PM
Jason Mackjoo
Jason Mackjoo - avatar
+ 2
If you just write a string (for example 'Hello World') into a file and run that, nothing will happen. You have to explicitly use print() to achieve screen output. Just writing the string alone works only in interactive mode when you feed code line by line to the interpreter.
2nd May 2019, 10:00 PM
HonFu
HonFu - avatar