+ 2
This may be a silly question but what is the difference between a string with the quotations and using print?
2 Antworten
+ 2
you have to use commands to make python print text for you , but in python idle of you type for example "hello world"
this is shown as a result with single quot marks in the idle but it will not be shown in an executable program .
+ 1
print("This is a string") is the correct syntax for a python program. Python ran from the command line just assumes you want to print a lone string when you put it in.