about functions question

NoName zaz600 at gmail.com
Thu Oct 25 08:18:42 EDT 2007


sorry! Yes it's work.
What about 2 question?
Can i put function after main block?

print qq()

def qq():
  return 'hello'

Traceback (most recent call last):
  File "C:\Python25\projects\indexer\test.py", line 1, in <module>
    print qq()
NameError: name 'qq' is not defined


Or onli possible:

def main():
 print qq()

def qq():
  return 'hello'

main()




More information about the Python-list mailing list