3

I am new to Python.

I installed Python on my Windows 2003 Virtual Machine; Launched the Python Shell; Typed the following code -

print "Hello World"

And it spit right back at me the following

SyntaxError: invalid syntax

Here are some other following statements

>>> x = 10

>>> print x 

SyntaxError: invalid syntax

The following worked fine though.

>>> x 

10

Why wouldn't Python let me write a simple Hello World program?

agf
  • 160,324
  • 40
  • 275
  • 231
Kanini
  • 1,837
  • 4
  • 31
  • 57

1 Answers1

4

Duh! My mistake.

print(x)

is the command.

Sorry folks!

Kanini
  • 1,837
  • 4
  • 31
  • 57