鱼C论坛's Archiver
论坛
›
Python交流
› def和返回值
xy1770
发表于 2020-7-5 16:54:09
def和返回值
def divid(a,b):
shang = a//b
yushu = a%b
return shang, yushu
print divid(6,2)
报错:
File "<ipython-input-12-6b99aec92f9f>", line 5
print divid(6,2)
^
SyntaxError: invalid syntax
qiuyouzhi
发表于 2020-7-5 16:57:06
???
你print后面括号呢
这不是Python2
页:
[1]
查看完整版本:
def和返回值