Thread: Learning Python ( Reference:Dive Into Python 5.4 )
hi. have started learn python (most hour ago). have bit of knowledge of c-programming, , wanted learn object oriented one, choose python.
within 1 hour, downloaded , installed python, , began first simple program , got error following:
i don't know if there has been drastic change in syntax v2 v3 of python idle(which might happen rarely), did suggested on book's first example.code:python 3.2.2 (default, sep 4 2011, 09:07:29) [msc v.1500 64 bit (amd64)] on win32 type "copyright", "credits" or "license()" more information. >>> 1 + 1 2 >>> print 'hello world syntaxerror: eol while scanning string literal >>> print 'hello world' syntaxerror: invalid syntax >>> print "hello world" syntaxerror: invalid syntax >>>
sorry if question simple one, python totally new me. in c, remember did #include<conio> printf command.
there nothing mentioned here...small favor needed here.
, forgive stupid question please.
regards, winuxuser
according this, 'print' no longer statement function (v3.0 , up).
should work:
hope helps.code:print("hello world")
regards.
Forum The Ubuntu Forum Community Ubuntu Specialised Support Development & Programming Programming Talk [SOLVED] Learning Python ( Reference:Dive Into Python 5.4 )
Ubuntu
Comments
Post a Comment