如何下载安装第三方函数库
easy_install httplibs是在liunx
windows 安装 httplib2
python setup.py install
自定义的函数
def function_name(parameter)://这要一个冒号,并且用def定义
(tab) statement;//要用tab
(tab) statement;
ps:
def test():
print 'hello world!';
print 'ni hao';
print 'Entry program name'
test()
print 'leave programe'
def test():
print 'hello world!';
print 'ni hao';
def test_b(var1=1,var2=3):
print var1,var2;
var3=var1+var2;
print var3;
return var3,var1,var2;
def test_c(var1=1,var2=3):
print var1,var2;
var3=var1+var2;
print var3;
sun=test_c();
sun1,sun2,sun3=test_b(1,2)
print sun1,sun2,sun3
print 'Entry program name' #aaa
test()
print 'leave programe'