def problem

clickron at webtv.net clickron at webtv.net
Sat Feb 10 11:56:18 EST 2001


I write this, save it. and run it.
def hello():
      print "hello"
      print "bye bye"

hello()

and I get this message

hello
Traceback innermost last):
File "<pyshell27>",line 1, in ?
hello
NameError: There is no variable named 'hello'

What am I doing wrong?

Ron






More information about the Python-list mailing list