+ 2
Python strings?
If i use “Hello” it should get ‘Hello’ right? But each time i do so it says No output?
6 Réponses
0
Please describe your question in more detail. If you want 'Hello' to be displayed to the screen, you have to use the print function like this:
print('Hello')
0
Lucky Luke hi there thanks for the reply! im referring to the Python tutorial for Strings. The tutorial states the following:
>>> "Python is fun!"
'Python is fun!'
>>> 'Always look on the bright side of life'
'Always look on the bright side of life'
but when i try it out, it doesnt seem to work as what they portray
0
This will be the result if you type the strings in the Python interpreter. There will be no output however when you test it at the Code Playground or a code editor.
0
Lucky Luke ahh i see so does that mean its like printing if keyed into the Python intepreter?
0
Jay See Yes, that's the point of it.
0
>>> "
"