上一页 1 2 3 4 5 6 ··· 28 下一页
摘要: import turtle from turtle import * #turtle.bgpic("xrr.png") pm=Screen() #新建屏幕对象 pm.delay (0) #设定屏幕延时为0 pm.title("雪容融") turtle.speed(3) # 速度 # 大头的圈圈 tu 阅读全文
posted @ 2024-07-21 08:42 limalove 阅读(21) 评论(0) 推荐(0)
摘要: from array import array import math import functools import itertools import operator import reprlib class Vector: typecode = 'd' def __init__(self, c 阅读全文
posted @ 2024-07-21 08:36 limalove 阅读(19) 评论(0) 推荐(0)
摘要: from array import array import math class Vector2d: __match_args__ = ('x', 'y') typecode = 'd' def __init__(self, x, y): self.__x = float(x) self.__y 阅读全文
posted @ 2024-07-21 08:36 limalove 阅读(22) 评论(0) 推荐(0)
摘要: 多数特殊方法最常被Python解释器调用。 阅读全文
posted @ 2024-06-17 22:50 limalove 阅读(6) 评论(0) 推荐(0)
摘要: 描述符:非特殊的方法可以被实例属性遮盖 函数和方法只实现了__get__方法,属于非覆盖型描述符。 特殊方法不受这个问题的影响,是因为解释器只在类中寻找特殊方法。 __repr__, __getattr__ 都是如此 测试代码: class LineItem: def __init__(self, 阅读全文
posted @ 2024-04-03 05:29 limalove 阅读(12) 评论(0) 推荐(0)
摘要: from itertools import product import pandas as pd res = list(product(['a','b'],['c'],['d','e','g'])) print(res) data = list(product(range(10), range(1 阅读全文
posted @ 2024-03-15 22:23 limalove 阅读(49) 评论(0) 推荐(0)
摘要: flush = True 参数不可缺少,因为Python的输出默认以行为单位缓冲,即Python只在换行符后显示可打印的字符。 阅读全文
posted @ 2024-01-09 21:23 limalove 阅读(16) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2023-12-30 08:39 limalove 阅读(14) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2023-12-26 21:39 limalove 阅读(5) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2023-12-25 10:56 limalove 阅读(7) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 ··· 28 下一页