2020年2月22日

Python学习之路(四):基础知识之深浅拷贝

摘要: 1.is和==的区别 == 比较左右两边的值,如果相同,打印的是True,如果不同,打印的是False 1 n = 10 2 n1 = 12 3 print(n == n1) #False is比较的是内存地址 1 a = 'dhj' 2 b = 'dhj' 3 print(a is b) # Tr 阅读全文

posted @ 2020-02-22 14:44 Py_studying 阅读(190) 评论(0) 推荐(0) 编辑

Python学习之路(三):基础知识之运算符

摘要: 1.while循环 1.1 while基本格式 while循环体格式为: while 循环条件: 循环体1 循环体2 1 count = 1 2 while count <= 10: # 循环条件的关键在于控制循环次数 3 if count != 7: 4 print(count) 5 count 阅读全文

posted @ 2020-02-22 12:04 Py_studying 阅读(153) 评论(0) 推荐(0) 编辑

导航