Error in the python 3.41 shell

This is the place for queries that don't fit in any of the other categories.

Error in the python 3.41 shell

Postby brenden9870 » Thu Jun 12, 2014 4:56 am

the shell makes weird syntax errors, and i don't know whats wrong. heres the log:
Code: Select all
Python 3.4.1 (v3.4.1:c0e311e010fc, May 18 2014, 10:45:13) [MSC v.1600 64 bit (AMD64)] on win32
Type "copyright", "credits" or "license()" for more information.
>>> print "hello world"
SyntaxError: invalid syntax
>>> print "hello world"
SyntaxError: invalid syntax
>>>


any help would be great
Last edited by metulburr on Thu Jun 12, 2014 5:05 am, edited 1 time in total.
Reason: locked post, added code tags
brenden9870
 
Posts: 2
Joined: Thu Jun 12, 2014 4:54 am

Re: Error in the python 3.41 shell

Postby metulburr » Thu Jun 12, 2014 5:04 am

In python3.x print is a function as opposed to python2.x which its a statement

so you need:
Code: Select all
print('hello world')
New Users, Read This
OS Ubuntu 14.04, Arch Linux, Gentoo, Windows 7/8
https://github.com/metulburr
steam
User avatar
metulburr
 
Posts: 1476
Joined: Thu Feb 07, 2013 4:47 pm
Location: Elmira, NY


Return to General Coding Help

Who is online

Users browsing this forum: No registered users and 6 guests