摘要:
"D:\Program Files\Python37\python.exe" D:/code/python3/homework1/money_cocks.pyThe number of cock, hen, chicken is: 4 12 84The number of cock, hen, ch 阅读全文
阅读排行榜
fork 炸弹
2019-04-03 20:11 by yanux, 325 阅读, 收藏,
摘要:
一段古老的Linux shell程序 :() { :|:& };: 这是bash shell的写法,首先定义了一个函数:(),花括号里面是函数体,这里递归执行函数本身,通过管道在后台再递归运行一次本程序,最后的冒号就是立刻执行当前这个函数。这样一直运行下去,直到系统崩溃,这就是fork炸弹. 第一个 阅读全文
python3--basic1
2019-07-12 23:10 by yanux, 242 阅读, 收藏,
摘要:
L1 = [11, 22, 33,'a', 'b',(1,2,3)] L2 = [33,'b','c',55,22,(1,2,3)] # find out the list with the same elements # L3 = [] # for i in L1: # if i in L2: # L3.append(i) # print(L3) # find ... 阅读全文
python3--basic2
2019-07-12 23:46 by yanux, 208 阅读, 收藏,
摘要:
# 1,2,3,4,5,6,7,8,9 print all the non-duplicated 2 bits numbers consist of these numbers; # print the counter of the numbers # L = [] # for i in range(1,10,1): # for j in range(1,10,1): # ... 阅读全文