+ 2

What is the difference between print(''pythonn'') and >>>''pythonn''

29th Dec 2018, 2:38 PM
Saransh Agarwal
Saransh Agarwal - avatar
2 Answers
+ 2
'Python' is just a string. When you use Python in interactive mode, it will print out such a string automatically, but if you try to write a program and only put a string in it and run it, nothing will happen. It's somewhat like this: You: 'Here's a string.' Python: 'I can see that. Now what?' You: '.....' So in an actual script, you explicitly have to write: print('Python')
29th Dec 2018, 4:25 PM
HonFu
HonFu - avatar