红豆沙  

2024年11月6日

摘要: import pymysql connection = pymysql.connect( host='localhost', port=3306, database='your_database', user='your_user', password='your_password', charse 阅读全文
posted @ 2024-11-06 11:43 红豆沙 阅读(28) 评论(0) 推荐(0)
 
摘要: 1.列表推导式:生成新的列表 [expression for item in iterable] numbers = [1, 2, 3, 4, 5] squares = [x**2 for x in numbers] print(squares) # 输出: [1, 4, 9, 16, 25] 2. 阅读全文
posted @ 2024-11-06 10:36 红豆沙 阅读(53) 评论(0) 推荐(0)