摘要: # # 字典嵌套排序students = [{'name': 'Jack', 'age': 17, 'score': 89}, {'name': 'Julia', 'age': 17, 'score': 80}, {'name': 'Tom', 'age': 16, 'score': 80}] # 阅读全文
posted @ 2023-07-05 17:43 你说夕阳很美 阅读(42) 评论(0) 推荐(0)
摘要: import types class People: def speak(self): print("hello, world") def speak(self): print("hello, python") p = People() p.speak = types.MethodType(spea 阅读全文
posted @ 2023-07-05 17:36 你说夕阳很美 阅读(44) 评论(0) 推荐(0)
摘要: mstr = 'abc' ml = [1,2,3] print(mstr[::-1]) # cba print(ml[::-1]) #[3, 2, 1] 阅读全文
posted @ 2023-07-05 13:45 你说夕阳很美 阅读(11) 评论(0) 推荐(0)