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
  • 171,228
  • 44
  • 289
  • 238
Kanini
  • 1,947
  • 6
  • 33
  • 58

1 Answers1

4

Duh! My mistake.

print(x)

is the command.

Sorry folks!

Kanini
  • 1,947
  • 6
  • 33
  • 58