摘要: class Player(object): def __init__(self, uid, name, status=0, level=1): self.uid = uid self.name = name self.stat = status self.level = level class Pl 阅读全文
posted @ 2020-12-19 19:15 ty1539 阅读(42) 评论(0) 推荐(0) 编辑
摘要: 方式一:一个个的用函数实现 #_*_ encoding: utf-8 _*_ @author: ty hery 2019/1/12 import requests def getWeather(city): r = requests.get(u'http://wthrcdn.etouch.cn/we 阅读全文
posted @ 2020-12-19 19:09 ty1539 阅读(67) 评论(0) 推荐(0) 编辑
摘要: from math import pi class Circle(object): def __init__(self, radius): self.radius = radius def getRadius(self): print('调用了getRadius方法') return self.ra 阅读全文
posted @ 2020-12-19 16:12 ty1539 阅读(97) 评论(0) 推荐(0) 编辑
摘要: 最先版本的 from telnetlib import Telnet from sys import stdin, stdout from collections import deque class TelnetClient(object): def __init__(self, addr, po 阅读全文
posted @ 2020-12-19 16:03 ty1539 阅读(108) 评论(0) 推荐(0) 编辑