码迷,mamicode.com
首页 >  
搜索关键字:print    ( 43532个结果
Python中变量的绑定,或者说引用
print('The simple assignment')shoppingList = ['chicken','mango','apple','banana']myList = shoppingListprint('Before any action')print('The shopping li...
分类:编程语言   时间:2015-04-22 17:42:10    阅读次数:142
Python的数据结构 -- 列表
shoppingList = ['apple','banana','lemon','juice','jam']print('my shopping list is',shoppingList)for item in shoppingList: print(item)print("I have",l....
分类:编程语言   时间:2015-04-22 17:41:06    阅读次数:115
Python的数据结构 -- 字符串
zoo = ('大象','老虎','狮子','北极熊')print('The animal number of the is ', len(zoo))print('The animal of the zoo are ',zoo)new_zoo = ('孔雀','鳄鱼',zoo)print('The ...
分类:编程语言   时间:2015-04-22 17:40:59    阅读次数:120
python 文件和路径操作函数小结
1: os.listdir(path) //path为目录 功能相当于在path目录下执行dir命令,返回为list类型 print os.listdir('..') 2: os.path.walk(path,visit,arg) path :是将要遍历的目录 visit :是一个函数指针,函数圆形...
分类:编程语言   时间:2015-04-22 17:36:09    阅读次数:156
Python的数据结构 -- 序列
shoppingList = ['apple','banana','cat','dog','duck']#Indexing and 'subscription operation'print('The first item is',shoppingList[0])print('The second ...
分类:编程语言   时间:2015-04-22 17:35:12    阅读次数:144
4.22c++练练手
/*#include using namespace std; class TDate { public: void SetDate(int y, int m, int d); int IsLeapYear(); void Print(); private: int year,month,day; }; void TDate::SetDate(int y, int m, in...
分类:编程语言   时间:2015-04-22 15:18:56    阅读次数:165
python 系统编程之创建进程 create process
一、forking 进程通过fork产生的进程有以下几个特点: 是一个进程的克隆。 创建的进程独立于父进程单独存在。 线程在调用fork()那那点被复制执行。 在子线程中返回0。 在父线程中返回子线程的pid 子线程的PID不同于父线程。 二、代码示例#!/usr/bin/env pythonimport osdef child_process(): print "I am the chi...
分类:编程语言   时间:2015-04-22 14:02:16    阅读次数:198
读<<programming ruby>> 7.6节 flip-flop 理解
书中源码是这样的File.foreach('1.txt') do |x| if(($. == 1) || x =~ /eig/) .. (($. == 3) || x =~ /nin/) then print x endend其中 1.txt内容如下firstsecondthirdfour...
分类:其他好文   时间:2015-04-22 13:48:41    阅读次数:93
Perl学习笔记(九)--文件(四)
十一、文件测试 -op expr if(-e “filea”){print STDERR(“file1/n”):} 文件是否存在. -b是否为块设备 -c是否为字符设备 -d是否为目录 -e文件是否存在 -f是否为普通文件 -g是否设置了setgid位 -k是否设置了sticky位 -l是...
分类:其他好文   时间:2015-04-22 13:45:48    阅读次数:126
如何在已安装vs2010的基础上安装sql2008
以前老受到别人写的这类东西的帮助,所以这次决定自己试下,第一次发这种,写得不好莫怪。 涉略sql2008一个多星期了。怎么说呢?Transact-SQL的编程虽然不如C++,java等高级语言,但当随着接触的加深,发觉其实它也封装得挺好的,针对性强吧。而且if else case print等函数跟...
分类:数据库   时间:2015-04-22 13:32:23    阅读次数:118
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!