上一页 1 2 3 4 5 6 7 8 ··· 10 下一页
摘要: 1、定义元组 my_cars = "红旗", "五菱宏光", "雅迪" # 元组是用逗号识别的 print(my_cars) cars = ("奔驰", "宝马", "奥迪") print(cars) 2、元组不可修改,可重新赋值 my_cars = ("宝马",) print(my_cars) # 阅读全文
posted @ 2025-09-22 17:15 Clefairy 阅读(3) 评论(0) 推荐(0)
摘要: import wx import time from datetime import datetime, timedelta class MyFrame(wx.Frame): def init(self): super().init(None, title='用眼提醒', size=wx.Size( 阅读全文
posted @ 2025-09-22 17:10 Clefairy 阅读(10) 评论(0) 推荐(0)
摘要: 1、for循环遍历整个列表 cars = ["奔驰", "比亚迪", "长安", "理想"] cars.insert(0, "红旗") cars.append("长安") cars.insert(len(cars), "宝马") # 可以在列表中每个元素前后添加元素 cars_new = [] fo 阅读全文
posted @ 2025-09-22 17:05 Clefairy 阅读(5) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 8 ··· 10 下一页