51CTO博客开发
for n in (1,5,4,3,2):#内容是只读的 print n;for n in [1,5,4,3,2]:#内容可以修改 print n;for c in open('test1.py','r').readlines():#读文件内容 print c;for r in open('test1.py','r').
##for target in sequences: 这就像foreach## statements;##sequences##list##tuple##strings##filess1='daiyujie';i=0;for c in s1: print format(i,'2d'),c; i=i+1;else: &nb
#while usagex=int(raw_input('input a number:'));s=0;while(x<=100): x=x+1; s=s+x; print 'hello world!';print s;#python 刷阅读次数import webbrowser as webimport time
####def functiontest():## x=int(raw_input('please input number:'));## if(x>8):## print "larger than 8";## else:## &nb
如何下载安装第三方函数库easy_install httplibs是在liunxwindows 安装 httplib2python setup.py install自定义的函数def function_name(parameter)://这要一个冒号,并且用def定义(tab) statement;//要用tab(tab)&nb
Copyright © 2005-2025 51CTO.COM 版权所有 京ICP证060544号