已采纳回答 / us4ever
我一开始的时候也是这样,后来发现漏掉了一个return语句,建议把代码从头到尾对照一遍,查查有没有漏写或写错(很容易把url和urls搞错,之类的)
2016-03-23
已采纳回答 / 霍霍不二
urllib.request.data = "Some data"参考以下链接:http://stackoverflow.com/questions/25734145/python-and-the-new-way-to-add-data-to-urllib-requests
2016-03-21
已采纳回答 / koubi
初次接触Python的人会很不习惯Python没有main主函数。这里简单的介绍一下,在Python中使用main函数的方法#hello.pydef foo(): str="function" print(str);if __name__=="__main__": print("main") foo()其中if __name__=="__main__":这个程序块类似与Java和C语言的中main(主)函数在Cmd中运行结果C:\work\python\divepy>pyth...
2016-03-20