6
Possible Duplicate:
Syntax error on print with Python 3无效的语法打印在Python 3.3.0
我尝试做阶乘在Python 3和任何我已经把它告诉我同样的事情“无效语法:语法错误” ......为什么给我一个错误 ?感谢
版本
Python 3.3.0 (v3.3.0:bd8afb90ebf2, Sep 29 2012, 10:57:17) [MSC v.1600 64 bit (AMD64)] on win32
这是我尝试做
>>> def fact(n):
... res = 1
... while n > 1:
... res *= n
... n -= 1
... return res
,当我尝试打印
>>> print fact(23)
它告诉我语法错误:无效的语法