文章分类 -  Pytion

摘要:# -*- coding: cp936 -*-#D:\workspace\Pytion_workspace\004_list.pysCollege=1231# len() range() print 'len() 和 range()函数'print len(sCollege)print range( 阅读全文

posted @ 2016-07-03 00:11 fantiejun0436 阅读(78) 评论(0) 推荐(0)

摘要:# -*- coding: cp936 -*-#D:\workspace\Pytion_workspace\004_list.py# 001_分支结构 nAge =15if nAge==1: print 'children'elif nAge==2: print 'haha children'els 阅读全文

posted @ 2016-07-03 00:03 fantiejun0436 阅读(91) 评论(0) 推荐(0)

摘要:# -*- coding: cp936 -*-#D:\workspace\Pytion_workspace\002_list.py# 005_id()对象再内存中地址 nListNums=[22,33,44,55]print nListNumsa =nListNums[0]print ('addre 阅读全文

posted @ 2016-07-02 23:19 fantiejun0436 阅读(112) 评论(0) 推荐(0)

摘要:# 001_数学 import decimaldir(decimal)# 002_动态执行命令 exec('print 123')#execfile("D:\workspace\Pytion_workspace\001_list.py")#eval() #用字符串 动态 创建# 003_字符串截取 阅读全文

posted @ 2016-07-02 23:14 fantiejun0436 阅读(96) 评论(0) 推荐(0)

摘要:# -*- coding: cp936 -*-#D:\workspace\Pytion_workspace\001_list.py# list print '--001 def list'mList = [1,2,3,4]print(mList) # iterator element of list 阅读全文

posted @ 2016-07-02 18:07 fantiejun0436 阅读(87) 评论(0) 推荐(0)

摘要:一、输出流 1.通配符的使用 '%d %s' print '%d hellow world %s' % (1,'ss') 2.'print输出流' 的重定向 f=open('d:\\temp\\a.txt','w') # 把输入流中的内容,输出到目标文件中 print >> f ,'ss' f.cl 阅读全文

posted @ 2016-07-02 17:44 fantiejun0436 阅读(170) 评论(0) 推荐(0)

导航