How is print statement represented in python 3 (v/s python2)?



How is print statement represented in python 3 (v/s python2)?..

Answer / Gagan Sachan

In Python 2, the print statement requires parentheses: print "n". In Python 3, the print function no longer needs parentheses and it automatically prints on a new line without needing to append "n": print("...").

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Python Interview Questions

Why is button parameter “command” executed when declared?

1 Answers  


How will you capitalize the first letter of a string?

1 Answers  


How to concatenate two lists in python?

1 Answers  


How to read a 10gb (or larger) file size in python?

0 Answers  


How to avoid having class data shared among instances?

1 Answers  


Where python is mostly used?

1 Answers  


How do you use n in python?

1 Answers  


What is the best notepad?

0 Answers  


What are the various types of operators in Python?

2 Answers  


Does flask work with python 3?

1 Answers  


Explain other string literals?

1 Answers  


What are types in python?

1 Answers  


Categories