????
#This is a Python introducer
#it can get your question and gine your answer
def PythonIntroducer(question):
"""I am a Python introdecer"""
RecognizeGrammer=["who are you","What's the Python",\
"Who are using the Python"]
Answer=[PythonIntroducer.__doc__,"Python is a Script Language",\
"Such as Yahoo!mail,Yahoo!pages"]
if question in RecognizeGrammer:
return Answer[RecognizeGrammer.index(question)]
else:
return "I don't understand what u said"
if__name__ == "__main__":
while 1:
question=raw_input("Hello World:")
print PythonIntroducer(question)
编译时显示:
G:\py\1>python hellow.py
File "hellow.py",Line 14
if__name__ == "__main__":
^
SyntaxError: invalid syntax
^记号打在:号的下面,什么地方错了???