Basic Python Hello World Program Syntax Error

Issue

I am not that really new in Programming but in Python I am really a newbie, and so when I started learning Python from the tutorials they encouraged me to use the IDLE editor for Python. And so as a newbie I had this weird Hello World problem.

enter image description here

as you can see i use Python 2.6.6 in Linux(CentOS 6.2)

and I tried almost all the possible syntaxes printing the simple HELLOWORLD provided in the documentation of python 2.6 and the new python 3

I tried printing contants like this

print 1 + 1

and it work with an output

>>> 2

I want to know how can i print this simple HELLOWORLD

Solution

Check to make sure that you are really using straight quotes. Some programs/systems automatically replace them with curly quotes.

Here try copy pasting this and running it:

print "hello"

If this turn’s out to be an issue then you might want to ask at https://unix.stackexchange.com/ how to disable such a feature.

Answered By – Jakub Hampl

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published