0

Getting started (Python)

Hello friends, what is the difference between print ("") and print () In sololearn compiler I always have to put print ("") but with other compilers on other apps if I only put print () is enough... So why does it happen?

22nd Oct 2021, 1:53 PM
Jose
Jose - avatar
2 Respuestas
+ 2
The Python print() function takes in any number of parameters, and prints them out on one line of text. The items are each converted to text form, separated by spaces, and there is a single '\n' at the end (the "newline" char). When called with zero parameters, print() just prints the '\n' and nothing else. In the interpreter, standard-out displays to the screen so it's an easy way to see what print() does
22nd Oct 2021, 1:59 PM
MATOVU CALEB
MATOVU CALEB - avatar
+ 1
Thanks for your answer! MATOVU CALEB
22nd Oct 2021, 2:10 PM
Jose
Jose - avatar