![](https://img-blog.csdnimg.cn/20201014180756926.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Python 3
williamamg
这个作者很懒,什么都没留下…
展开
-
Python的While循环与逻辑判断语法
ico = 0while ico != 5: print('Type "your name"!') name = input() ico+=1 if name != 'your name': print('you have' + str(5 - ico) + 'times left') elif name == 'your原创 2016-11-17 11:13:42 · 1301 阅读 · 0 评论 -
列表中的Copy与DeepCopy
import copyoriginalList = ['a','b',[1,2]]passingList = originalListprint('OriginalList:')print(originalList)copyList = copy.copy(originalList)deepcopyList = copy.deepcopy(originalList)print('__原创 2016-12-12 10:19:01 · 571 阅读 · 0 评论 -
完整的写一个Python小程序
def collatz(number): if number%2 == 0: print('number/2') return number / 2 elif number%2 == 1: print('3 * ' + str(number) + ' + 1') return 3*number+1print('th原创 2016-12-06 18:01:10 · 12878 阅读 · 3 评论