11 2022 档案

摘要:#_*_ encoding: utf-8 _*_ @author: ty hery 2018/10/6 # 发送邮件失败了 import smtplib #加载smtplib模块 from email.mime.text import MIMEText from email.utils import 阅读全文
posted @ 2022-11-20 20:45 ty1539 阅读(10) 评论(0) 推荐(0) 编辑
摘要:1, 速度很快, 唯一缺陷是计数长度列表和排序的最大数字相等, 如果排序中的数字实在太大了, 创建的列表太长了比如2的32次方 import random def count_sort(li, max_count =21): count = [0 for _ in range(max_count+1 阅读全文
posted @ 2022-11-13 15:04 ty1539 阅读(25) 评论(0) 推荐(0) 编辑
摘要:如果要使用classonlymethod ,则需要先定义好一个classonlymethod 类。 首先我们需要明白无论是classonlymethod还是classmethod,本质都是一个类,而classonlymethod继承了classmethod。 classonlymethodz作用:只 阅读全文
posted @ 2022-11-06 20:47 ty1539 阅读(130) 评论(0) 推荐(1) 编辑
摘要:import unittest class MyTestCase(unittest.TestCase): def test_something(self): self.assertEqual(0, False) if __name__ == '__main__': unittest.main() 输 阅读全文
posted @ 2022-11-06 17:25 ty1539 阅读(40) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示