我一直在试图让一个函数来工作,我只是不能似乎弄清楚为什么我得到这个功能有什么问题?不能弄明白
TypeError: stringCounter() takes exactly 1 argument (0 given)
每次我运行此代码
def stringCounter(count):
name ='Hi'
formatString = "%s run count is %d"
print formatString % (name, count)
test = stringCounter()
test.stringCounter(1)
我有尝试添加自己,搞乱变数传递我做错了什么?多谢你们!