![](https://img-blog.csdnimg.cn/20201014180756926.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
python
T - climber
这个作者很懒,什么都没留下…
展开
-
异常处理相关
异常处理方式及其演练原创 2022-07-13 09:59:43 · 79 阅读 · 1 评论 -
time 时间处理
```python 对时间处理 time 参考地址:https://www.runoob.com/python/python-date-time.html import time # 人类时间 # 1、时间元祖 年/月/日/时/分/秒/星期/一年的第几天/夏令时 print(time.localtime()) # time.struct_time(tm_year=2022, tm_mon=7, tm_mday=7, tm_hour=19, tm_min=15, tm_sec=24, tm_wday=3,原创 2022-07-10 19:00:36 · 112 阅读 · 0 评论 -
教学代码---学生系统
学生系统原创 2022-06-06 20:33:54 · 130 阅读 · 1 评论 -
【2048思想-代码】
list_merge = [2, 0, 2, 0] """ 零元素向右移动 思想:从后向前判断,如果是0则删除,末尾补0 """ def zero_to_end(): for i in range(len(list_merge)-1, -1, -1): if list_merge[i] == 0: del list_merge[i] list_merge.append(0) """ 合并: """ #原创 2022-05-20 23:12:53 · 80 阅读 · 0 评论 -
面向对象三大特征及六个原则
面向对象中心思想 类:有行为需要承担 对象:表达数据不同 类与类行为不同,对象与对象数据不同 1、小明使用手机打电话 a:识别对象 小明对象 手机对象 b:分配职责 打电话 通话 c:建立交互 person 调用 手机 调用方式:1>直接创建对象调用; 2>在构造函数中创建对象; 3>通过参数传递对象 代码如下: class Person: def __init__(self, name): self.name = name def原创 2022-05-16 13:15:04 · 299 阅读 · 0 评论