#include<stdio.h>
int?levels(?int?n?,?int?*?val);
void?print(?int?level_num?,char?ch);
int?main(void){
??int?val?=?0;
??int?n?=?0;
??int?level?=?0;
??int?*?pval?...
分类:
其他好文 时间:
2015-10-06 09:13:45
阅读次数:
148
今天所写的这篇随笔,将是我入住博客园的第一篇随笔。他将记录我的疑惑与心得,与我共同成长!我接触python已经有5天了,发现自己所写的每一个简单小练习,都会遇到各种各样的问题。出现最多的问题,就是python2与3的版本差异所造成的。1. print在python3中已经变为函数print () ....
分类:
编程语言 时间:
2015-10-05 23:12:18
阅读次数:
337
#encoding:utf-8
obuff=[]
repeat=0
path=raw_input(‘pleaseinputyourpath:‘)
forlninopen(path):
iflninobuff:
repeat+=1
continue
obuff.append(ln)
print"repeatcolumnsis%s"%repeat
withopen(path,‘w‘)ashandle:
handle.writelines(obuff)
分类:
其他好文 时间:
2015-10-05 19:37:11
阅读次数:
248
列表1有序的集合2通过偏移来索引,从而读取数据3支持嵌套4可变的类型a=[1,2,3]print(a[-1]) 结果 3b=[[1,2,3],[4,5,6]]print(b) 结果[[1, 2, 3], [4, 5, 6]]print(b[0]) 结果[1, 2, 3]print(b[0][1]) ...
分类:
编程语言 时间:
2015-10-04 23:30:45
阅读次数:
280
1 for(int a = 5; a > 0 ; a--) 2 { 3 for(int b = 1; b = a; c--) 8 { 9 System.out.print("B");10...
分类:
其他好文 时间:
2015-10-04 20:54:03
阅读次数:
659
仅仅列出我用到的,不全。划重点: 1. urllib2 用 urllib.request 代替 2. urllib.urlencode 用 urllib.parse.urlencode 代替 3. cookielib 用 http.cookiejar 代替 4. print " " 用 pr...
分类:
编程语言 时间:
2015-10-04 18:24:01
阅读次数:
415
1 for(int i = 0 ;i = i;a--) 4 { 5 System.out.print(" "); 6 } 7 for(int a = 0;a = i;a--)24...
分类:
其他好文 时间:
2015-10-04 13:34:46
阅读次数:
192
分布式系统实践1.Distributed Systems(电子书)http://www.printfriendly.com/print/v2?url=http://book.mixu.net/distsys/ebook.html#要点: 免费的介绍分布式系统理论的电子书, 这本书的难度非常适合初学者...
分类:
其他好文 时间:
2015-10-03 16:55:35
阅读次数:
317
1 #coding:utf-8 2 def hanoi(n,x,y,z): 3 if(n==1): 4 print x,'-->',z 5 else: 6 hanoi(n-1,x,z,y)#将前n-1个盘子从x移动到y上 7 prin...
分类:
编程语言 时间:
2015-10-03 08:23:35
阅读次数:
182
注意:Python3.X 的print要有括号, Python 2.x的不需要放上学习时写的例子:import rem = re.match(r'(\w+) (\w+)(?P.*)', 'hello world!')print("m.string:", m.string)print("m.re:",...
分类:
编程语言 时间:
2015-10-02 23:43:46
阅读次数:
219